-
Notifications
You must be signed in to change notification settings - Fork 7.3k
vm misses const definitions after recursive loads (only in v0.11.15) #9084
Comments
@tjfontaine @cjihrig @chrisdickinson @trevnorris @jasnell Do you have some time to look into it to determine if this needs to be added to the 0.11.16 milestone? |
@misterdjules Do we know the commit that caused this? If we can get a quick fix for it let's go ahead and throw it on the 0.11.16 milestone. |
@trevnorris I've been busy with other issues/PRs so I haven't tried to investigate at all. |
@trevnorris The regression was introduced by the most recent upgrade to V8 (and subsequent commits that fix it). It also happens in io.js, so it's either due to the way node.js/io.js uses the V8's API, or it's still a bug in V8. I'll try to think of ways to narrow down the issue. |
@misterdjules excellent work. Thanks for tracking that down. |
@domenic Pulling you in since this also affects io.js. Any thoughts on why this is happening? |
This worked in V8 up to 3.28.22. After that this test fails. |
@trevnorris ... any further thoughts on this one? |
@jasnell Sorry. I only did some bisecting and briefly looked at it. Nothing deep enough to give a proper assessment. |
This is on my to-do list to look in to, but pretty far down there. The fact that it broke in V8 is encouraging, and hopefully will lead to a fix similar to that discovered in nodejs/node#1774. |
Candidate commit: https://code.google.com/p/v8/source/detail?r=22385 based on @trevnorris's 3.28.22 -> 3.28.23 range. |
We have a system configured with scripts in a DSL that is loaded with vm module.
This DSL have a "include" action so that a script can load other scripts.
We use "const" to declare constants in the script.
With Node.js upto 0.11.14 everything behaves as expected.
But with 0.11.15, something strange happens with const declarations:
consts before the first include behave as usual,
but consts after the first include disappear and we got an undefined.
We have simplified the DSL to the following program:
The following configuration scripts can be used to test the problem.
When executed with node-v0.10.35 or node-v0.11.14, we get the following output:
But when executed with node-0.11.15, we get:
Note the
undefined
in the last line of the output!The text was updated successfully, but these errors were encountered: