Browse files

deps: fix v8 valgrind warning

Fix the following valgrind warning:

    Conditional jump or move depends on uninitialised value(s)
        at 0x7D64E7: v8::internal::GlobalHandles::IterateAllRootsWithClassIds(v8::internal::ObjectVisitor*) (
        by 0x94DCDC: v8::internal::NativeObjectsExplorer::FillRetainedObjects() (
        # etc.

This was fixed upstream in r12903 and released in 3.15.2 but that commit
was never back-ported to the 3.14 branch that node.js v0.10 uses.

The code itself works okay; this commit simply shuffles the clauses in
an `if` statement to check that the node is in use before checking its
class id (which is uninitialized if the node is not in use.)
  • Loading branch information...
1 parent 5e06ce4 commit 6bd78fd7704a8a695fc76430b573bc482f42c320 @bnoordhuis bnoordhuis committed with indutny Mar 6, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 deps/v8/src/
2 deps/v8/src/
@@ -610,7 +610,7 @@ void GlobalHandles::IterateAllRoots(ObjectVisitor* v) {
void GlobalHandles::IterateAllRootsWithClassIds(ObjectVisitor* v) {
for (NodeIterator it(this); !it.done(); it.Advance()) {
- if (it.node()->has_wrapper_class_id() && it.node()->IsRetainer()) {
+ if (it.node()->IsRetainer() && it.node()->has_wrapper_class_id()) {

0 comments on commit 6bd78fd

Please sign in to comment.