-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vm]fixes #15974 #12551 #19464 #16020 #16780 #16613 #14553 #19909 #18641 #19902
Conversation
compiler/vm.nim
Outdated
@@ -1028,9 +1027,9 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = | |||
if regs[rc].kind == rkNodeAddr: | |||
ret = regs[rb].nodeAddr == regs[rc].nodeAddr | |||
else: | |||
ret = ptrEquality(regs[rb].nodeAddr, regs[rc].node) | |||
ret = ptrEquality(regs[rb].nodeAddr, regs[rc].regToNode) # todo fixme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm checking it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to be a pre-existing issue:
type
SinglyLinkedList[T] = ref object
proc addMoved[T](a, b: var SinglyLinkedList[T]) =
if a.addr != b.addr: discard
proc main =
var a: SinglyLinkedList[int]; new a
var b: SinglyLinkedList[int]; new b
a.addMoved b
static: main()
gives the same error messages as objects(my PR - regToNode) => field 'node' is not accessible for type 'TFullReg' using 'kind = rkRegisterAddr' [FieldDefect]
with 1.6.6 for ref objects.
My PR re-exposes the scar hidden for objects. I'm gonna to fix this pre-existing issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=> #19909
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed on the latest commit
Ping me again when it's ready. |
@narimiran could this be backported (preferrably 1.6 and 1.4)? This would allow to fix a bug in https://github.com/nim-lang/bigints for more than just devel (see nim-lang/bigints#94). |
It is already backported to the 1.6, which is our LTS, and it will be part of our next 1.6 release. The 1.4 line is not really maintained anymore, i.e. don't expect any new releases. |
…im-lang#16780 nim-lang#16613 nim-lang#14553 nim-lang#19909 nim-lang#18641 (nim-lang#19902) [backport] * revert nim-lang#12217 since the root problem seems to have been fixed; fix nim-lang#15974;fix nim-lang#12551; fix nim-lang#19464 * fix nim-lang#16020; fix nim-lang#16780 * fix tests and nim-lang#16613 * fix nim-lang#14553 * fix nim-lang#19909; skip skipRegisterAddr * fix nim-lang#18641
Reverts #12217 since the root problem seems to have been fixed;
The tests (see tests/vm/tmisc_vm.nim) fixed by #12217 continues to work after reverting the pr.
fixes #15974 regression(0.20.0 => devel): var params assignment gives silently wrong results in VM
fixes #12551 [regression] var param corruption and variable mutation when run the code with VM
fixes #19464 [VM] Immutable proc argument is incorrectly modified
fixes #16020 addr(object) doesn't work in VM
fixes #16780 object copy broken in vm
fixes #16613 Nim crashes randomly
fixes #14553 GC crash in VM with tuple unpacking loop and table
fixes #19909 addressing ref objects and comparing the pointer address in vm give FieldDefect
fixes #18641 addr doesn't work inside static at proc scope