|
|
Created:
4 years, 1 month ago by ivica.bogosavljevic Modified:
4 years, 1 month ago CC:
v8-reviews_googlegroups.com Target Ref:
refs/pending/heads/master Project:
v8 Visibility:
Public. |
DescriptionMIPS: Fix `This CL enables precise source positions for all V8 compilers`
Fix c3a6ca68d0646b10885ef7017557eaf463db2e4a
Fix compilation failure on MIPS and GCC cross compile that started to appear
after the CL c3a6ca68d0646b10885ef7017557eaf463db2e4a landed. The compilation
error is due to:
.././src/objects-inl.h:4129:54: error: assuming signed overflow does not occur
when assuming that (X + c) < X is always false [-Werror=strict-overflow]
DCHECK(index >= 0 && length >= 0 && index + length >= index &&
BUG=
Committed: https://crrev.com/ff4513a69bde7d913df04aa82e2dbfa562e70684
Cr-Commit-Position: refs/heads/master@{#41067}
Patch Set 1 #Patch Set 2 : Rewrite DCHECK to avoid signed overflow #Messages
Total messages: 29 (13 generated)
Description was changed from ========== MIPS: Fix `This CL enables precise source positions for all V8 compilers` Fix c3a6ca68d0646b10885ef7017557eaf463db2e4a Fix compilation failure on MIPS and GCC crosscompile that started to appear after the CL c3a6ca68d0646b10885ef7017557eaf463db2e4a landed. BUG= ========== to ========== MIPS: Fix `This CL enables precise source positions for all V8 compilers` Fix c3a6ca68d0646b10885ef7017557eaf463db2e4a Fix compilation failure on MIPS and GCC cross compile that started to appear after the CL c3a6ca68d0646b10885ef7017557eaf463db2e4a landed. The compilation error is due to: .././src/objects-inl.h:4129:54: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow] DCHECK(index >= 0 && length >= 0 && index + length >= index && BUG= ==========
One line fix for the compilation failure on MIPS. Please take a look!
On 2016/11/15 11:02:27, ivica.bogosavljevic wrote: > One line fix for the compilation failure on MIPS. > > Please take a look! I'm not sure it's legitimate to eliminate the overflow check. I hope one of the other reviewers (Yang? Michael?) would have a more qualified opinion.
On 2016/11/15 17:27:19, vogelheim wrote: > On 2016/11/15 11:02:27, ivica.bogosavljevic wrote: > > One line fix for the compilation failure on MIPS. > > > > Please take a look! > > I'm not sure it's legitimate to eliminate the overflow check. I hope one of the > other reviewers (Yang? Michael?) would have a more qualified opinion. According to C standard, overflow on signed integers causes an undefined behavior (I think this is legacy from the time when signed values were not represented as 2s complement). There is a way to check if addition of two signed integer would overflow without actually performing the addition: overflow happens if: index + length > MAX_INT <=> index > MAX_INT - length since length is positive, MAX_INT - length never underflows so this is the only check we need
Reminder! Please notice that because of this none of the tests for MIPS arch in the Debug configuration are not executing.
mstarzinger@chromium.org changed reviewers: + clemensh@chromium.org, mstarzinger@chromium.org - michael.starzinger@chromium.org
Looking OK from my end. I would like to get Clemens' blessing since he was the original author of the assertion in question. +Clemens: PTAL.
On 2016/11/16 at 14:34:20, mstarzinger wrote: > Looking OK from my end. I would like to get Clemens' blessing since he was the original author of the assertion in question. > > +Clemens: PTAL. This was indeed meant as overflow check, so can we just replace it by "length <= kMaxInt - offset"?
On 2016/11/16 at 14:40:42, Clemens Hammacher wrote: > On 2016/11/16 at 14:34:20, mstarzinger wrote: > > Looking OK from my end. I would like to get Clemens' blessing since he was the original author of the assertion in question. > > > > +Clemens: PTAL. > > This was indeed meant as overflow check, so can we just replace it by "length <= kMaxInt - offset"? Sorry, replace offset by index.
PTAL
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by ivica.bogosavljevic@imgtec.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/28759)
I tried to land it, but I am missing LGTM from the owner of object-inl.h
titzer@chromium.org changed reviewers: + titzer@chromium.org
lgtm
The CQ bit was checked by clemensh@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== MIPS: Fix `This CL enables precise source positions for all V8 compilers` Fix c3a6ca68d0646b10885ef7017557eaf463db2e4a Fix compilation failure on MIPS and GCC cross compile that started to appear after the CL c3a6ca68d0646b10885ef7017557eaf463db2e4a landed. The compilation error is due to: .././src/objects-inl.h:4129:54: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow] DCHECK(index >= 0 && length >= 0 && index + length >= index && BUG= ========== to ========== MIPS: Fix `This CL enables precise source positions for all V8 compilers` Fix c3a6ca68d0646b10885ef7017557eaf463db2e4a Fix compilation failure on MIPS and GCC cross compile that started to appear after the CL c3a6ca68d0646b10885ef7017557eaf463db2e4a landed. The compilation error is due to: .././src/objects-inl.h:4129:54: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow] DCHECK(index >= 0 && length >= 0 && index + length >= index && BUG= ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== MIPS: Fix `This CL enables precise source positions for all V8 compilers` Fix c3a6ca68d0646b10885ef7017557eaf463db2e4a Fix compilation failure on MIPS and GCC cross compile that started to appear after the CL c3a6ca68d0646b10885ef7017557eaf463db2e4a landed. The compilation error is due to: .././src/objects-inl.h:4129:54: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow] DCHECK(index >= 0 && length >= 0 && index + length >= index && BUG= ========== to ========== MIPS: Fix `This CL enables precise source positions for all V8 compilers` Fix c3a6ca68d0646b10885ef7017557eaf463db2e4a Fix compilation failure on MIPS and GCC cross compile that started to appear after the CL c3a6ca68d0646b10885ef7017557eaf463db2e4a landed. The compilation error is due to: .././src/objects-inl.h:4129:54: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow] DCHECK(index >= 0 && length >= 0 && index + length >= index && BUG= Committed: https://crrev.com/ff4513a69bde7d913df04aa82e2dbfa562e70684 Cr-Commit-Position: refs/heads/master@{#41067} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/ff4513a69bde7d913df04aa82e2dbfa562e70684 Cr-Commit-Position: refs/heads/master@{#41067} |