-
Notifications
You must be signed in to change notification settings - Fork 30.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
object properties change when inspected under specific conditions #8358
Comments
@joseph-lansdowne-hpe var input1 = { a: 1 }
var input2 = { a: 0.5 }
var result1 = { b: input1.a, weird: +input1.a } // why `+` ?
console.log(result1)
var result2 = { b: input2.a, weird: input2.a }
console.log(result1) // Do you mean `result2` ? I get |
No, both |
I cannot reproduce this bug on OSX either Edit: also tested on Linux |
I can reproduce on another Arch Linux installation too, this time not a VM ( |
cc @nodejs/v8 |
I can reproduce the bug locally and confirmed, with GCC 6 on Ubuntu, my patch for #8310 also seems to rectify this. I’m closing this as a duplicate of #8310, because even though the symptoms are a bit different, it still makes sense to me that the underlying issue is the same. Thanks for sending in the bug report! To mention it for users coming here looking for a solution: You can just use the official Node.js binaries from https://nodejs.org/, use Node 6.4.0 (which seems to only reduce the frequency of the bug, not eliminate it), or compile 6.5.0 from the sources using gcc < 6. |
Actually, @joseph-lansdowne-hpe your code seems to make a pretty good test case for the bug… would you be interested in trying to submit that to V8? |
I see from the issue you linked that you've created https://codereview.chromium.org/2292953002/ (which is now closed). Do you mean to mention the test case on that issue? Or to create another issue in the same issue tracker providing my code for potential use in a unit test or something? |
@joseph-lansdowne-hpe Sorry for not seeing your message, github’s email notifications seem to be a bit off today. The patch at https://codereview.chromium.org/2292953002/ is the equivalent of a github pull request, the “issues”-issues for V8 are managed at https://bugs.chromium.org/p/v8/issues/list. I was suggesting you try and put a patch together which contains that test… it takes quite a while to get to know the whole process around that, and I’m still learning myself, but I’d be happy (and I know the others here with more experience are, too) to try and work it out with you. Plus, you’d have contributed code to V8, which is just plain cool. |
Linux j-vm 4.6.4-1-ARCH #1 SMP PREEMPT Mon Jul 11 19:12:32 CEST 2016 x86_64 GNU/Linux
Code:
Output:
This works correctly on v4.4.3, where the output is:
The text was updated successfully, but these errors were encountered: