Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Unified Diff: src/arm64/lithium-codegen-arm64.cc

Issue 1058533007: Fix a few potential integer negation overflows (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/lithium-codegen-arm64.cc
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc
index 0cc1dfc5bcb36b8cacdcd79cc7b6934040f87dda..19e9ec04caad4b817c978e46da325198fab81afc 100644
--- a/src/arm64/lithium-codegen-arm64.cc
+++ b/src/arm64/lithium-codegen-arm64.cc
@@ -4316,7 +4316,7 @@ void LCodeGen::DoMulConstIS(LMulConstIS* instr) {
Register left =
is_smi ? ToRegister(instr->left()) : ToRegister32(instr->left()) ;
int32_t right = ToInteger32(instr->right());
- DCHECK((right > -kMaxInt) || (right < kMaxInt));
+ DCHECK((right > -kMaxInt) && (right < kMaxInt));
Sven Panne 2015/04/15 12:33:33 Hmmmm, why do we exclude -kMaxInt here? Shouldn't
Jakob Kummerow 2015/04/15 12:40:24 Nope, there are expressions like "-right" (line 44
Sven Panne 2015/04/15 13:02:41 Uh, oh... Looking at LChunkBuilder::DoMul for ARM6
bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow);
bool bailout_on_minus_zero =
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698