-
-
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
Global var defined within a proc gets initialized more than once under ORC #24621
Comments
mmh looks like a dup of #17552 ; the workaround does not work in this case, though. |
|
I get an OOM error when adding nodestroy in my real program. But adding things that should do nothing like When checking the above example (with nodestroy) in valgrind it looks like there are some double free |
No, it's not. ;-) |
|
Description
While experimenting with globals and threads I found they get reassigned each time the proc where they are defined is called. This seems to cause race conditions in threads, even though the global var is not mutated. The example is a reduced version that just shows bar is called more than once. If this is intended, the docs need fixing. Works as expected under refc.
Nim Version
Nim Compiler Version 2.3.1 [Linux: amd64]
Compiled at 2025-01-17
Copyright (c) 2006-2025 by Andreas Rumpf
git hash: 70d057f
active boot switches: -d:release
Current Output
Expected Output
Known Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: