|
|
DescriptionIntroduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again.
Without that, it has a few false positives about out-of-bounds array accesses.
Also makes the clang static-analyzer happy.
Original code review from Sven Panne:
https://codereview.chromium.org/790723002/
Committed: https://crrev.com/0b48b2a8ebfc791a36f4ec1f299f46db76265a3a
Cr-Commit-Position: refs/heads/master@{#30977}
Patch Set 1 #Patch Set 2 : ignore gcc strict-overflow warning in test #Patch Set 3 : gcc 4.8 doesn't understand #pragma ignored #
Messages
Total messages: 38 (17 generated)
karl@skomski.com changed reviewers: + bmeurer@chromium.org
PTAL
The CQ bit was checked by bmeurer@chromium.org
lgtm
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1361763004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1361763004/1
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_linux_gcc_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/bu...)
Since voiding UNIMPLEMENTED (https://codereview.chromium.org/1371593003/) was rejected. This will still fail in gcc: https://chromium.googlesource.com/v8/v8.git/+/master/src/elements.cc#254. gcc fails on this line because the introduced `noreturn` leads to a optimization that leads to a false positive warning about overflow. http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/bu... I changed it to UNREACHABLE() // TODO(danno): implement? This would follow the recommendation by Jakob to remove FATAL out of loops. This would also help clang as mentioned.
jkummerow@chromium.org changed reviewers: + jkummerow@chromium.org
No, simply removing the check was not at all what I meant. Replacing UNIMPLEMENTED with UNREACHABLE obviously has the same effect as voiding UNIMPLEMENTED, and therefore is just as undesirable. The way to fix such cases is to *move* the check out of the loop. In the specific case at hand, it can be dropped entirely, see https://codereview.chromium.org/1372533002. https://codereview.chromium.org/1361763004/diff/20001/src/elements.cc File src/elements.cc (right): https://codereview.chromium.org/1361763004/diff/20001/src/elements.cc#newcode257 src/elements.cc:257: UNREACHABLE(); // TODO(danno): implement Nope.
Patchset #2 (id:20001) has been deleted
On 2015/09/25 12:27:42, Jakob wrote: > No, simply removing the check was not at all what I meant. Replacing > UNIMPLEMENTED with UNREACHABLE obviously has the same effect as voiding > UNIMPLEMENTED, and therefore is just as undesirable. > > The way to fix such cases is to *move* the check out of the loop. In the > specific case at hand, it can be dropped entirely, see > https://codereview.chromium.org/1372533002. > > https://codereview.chromium.org/1361763004/diff/20001/src/elements.cc > File src/elements.cc (right): > > https://codereview.chromium.org/1361763004/diff/20001/src/elements.cc#newcode257 > src/elements.cc:257: UNREACHABLE(); // TODO(danno): implement > Nope. Yeah sorry removed the patchset.
The CQ bit was checked by karl@skomski.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1361763004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1361763004/1
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_linux_gcc_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/bu...)
On 2015/09/25 12:55:57, commit-bot: I haz the power wrote: > Try jobs failed on following builders: > v8_linux_gcc_compile_rel on tryserver.v8 (JOB_FAILED, > http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/bu...) PTAL Updated to fix: .././src/heap/spaces-inl.h: In function ‘void v8::internal::TestRegress169928()’: .././src/heap/spaces-inl.h:449:3: error: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Werror=strict-overflow] if (allocation_info_.limit() - top < size_in_bytes) {
Patchset #2 (id:40001) has been deleted
The CQ bit was checked by karl@skomski.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1361763004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1361763004/1
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_linux_gcc_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/bu...)
The CQ bit was checked by karl@skomski.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1361763004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1361763004/60001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_win_compile_dbg on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_compile_dbg/builds/7991)
The CQ bit was checked by karl@skomski.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1361763004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1361763004/80001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
karl@skomski.com changed reviewers: + jochen@chromium.org
lgtm
The CQ bit was checked by karl@skomski.com
The patchset sent to the CQ was uploaded after l-g-t-m from bmeurer@chromium.org Link to the patchset: https://codereview.chromium.org/1361763004/#ps80001 (title: "gcc 4.8 doesn't understand #pragma ignored")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1361763004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1361763004/80001
Message was sent while issue was closed.
Committed patchset #3 (id:80001)
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/0b48b2a8ebfc791a36f4ec1f299f46db76265a3a Cr-Commit-Position: refs/heads/master@{#30977}
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:80001) has been created in https://codereview.chromium.org/1370203002/ by ishell@chromium.org. The reason for reverting is: This CL breaks cross-compiling to arm.. |