-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Buffer.allocUnsafe causes "Conditional jump..." on valgrind #26464
Comments
Thanks for the report. I'd say that's expected given that checkBounds() checks that V8's runtime loads the byte at I'm not sure if this is something we actually want to fix because there's no real bug. I suppose the strongest argument for addressing it is that it can't be suppressed because the comparison takes place in runtime-generated code - the address and even the exact layout of the code can change between invocations. |
Is that really true? (I'm amazed that it amounts to something noticeable - I'm curious to test it myself)
I'm trying to understand why it's not a real bug, my best guess is that no matter what random memory value is read it won't cause Buffer
IMHO, almost any fix to this will have, at least, the 'penalty' of changing to checking |
I was able to replace multiple error checks with |
Yes, that's right. |
I am going to close this since it does not really seem to be a bug. Please feel free to comment in case this should be reopened. |
Working with valgrind to clean a giant networking application I was getting "Conditional jump or move depends on uninitialised value(s)" with js stacks (see below), took a long time but managed to zero in on reason.
Running the following code through valgrind will trigger the error
>valgrind --gen-suppressions=yes --leak-check=full /var/lib/nave/global/10.13.0/bin/node a.js
I've managed to trace the cause to
lib/internal/buffer.js:checkBounds
accessing the buffer that isn't initialized.Buffer.allocUnsafe
used byws
npm moduleShachar
The text was updated successfully, but these errors were encountered: