-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 top level vars are lost after a few iterations #769
Comments
cc @domenic |
@domenic also this? |
Haven't been able to test this with the new patches, but I didn't see any reason why the new patches would necessarily fix it. I still have a list of vm bugs to work on :) |
is this still an issue? |
It seems solved in current node releases, both LTS and Stable. Thank you very much. |
We use a DSL to configure a system.
We load it with vm.
Sometimes, for debuging purposes, we use top level variables in the DSL,
that are read and modified by several functions.
After a few executions of these functions, modifications done by one function
is not seen by others.
Tested with iojs-1.1.0.
It doesn't happen with node-0.12.0.
The following code reproduces the bug in a simplified framework.
The DSL executor:
A configuration script to give as argument
Executed with node-0.12.0 the result is as expected:
Executing Action 1 (1000)
Executing Action 2 (1)
Action 2 output: 1000
Executing Action 1 (1000)
Executing Action 2 (1)
Action 2 output: 1000
Executed with iojs-1.1.0 the result is
Executing Action 1 (1000)
Executing Action 2 (1)
Action 2 output: 517
Executing Action 1 (1000)
Executing Action 2 (1)
Action 2 output: 0
The value 517 differs on each execution.
I suppose it depends on the V8 optimization process.
Probably related to #548
and nodejs/node-v0.x-archive#9084
The text was updated successfully, but these errors were encountered: