Commit 7e176157 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[gcmole] Fix {MutableBigInt::BitwiseAnd} evaluation order warning.

This is a false positive of a potential evaluation order problem flagged
by the newest version of gcmole. While this is strictly speaking safe,
it is not statically known that the default argument of the fourth
parameter to {AbsoluteAndNot} is a nullptr and hence not a stale raw
reference. Since this is the only false positive of this kind in the
code base, I would vote to just avoid it by sequencing the operations.

R=jkummerow@chromium.org
BUG=v8:8813

Change-Id: I4a8f2ed4eb09766ce98e4e3d32f680a3a84eedf7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1523548Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60259}
parent 93ee5414
......@@ -690,7 +690,8 @@ MaybeHandle<MutableBigInt> MutableBigInt::BitwiseAnd(Isolate* isolate,
// Assume that x is the positive BigInt.
if (x->sign()) std::swap(x, y);
// x & (-y) == x & ~(y-1) == x &~ (y-1)
return AbsoluteAndNot(isolate, x, AbsoluteSubOne(isolate, y));
Handle<MutableBigInt> y_1 = AbsoluteSubOne(isolate, y);
return AbsoluteAndNot(isolate, x, y_1);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment