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

Issue 2588433002: abort in delete operators that shouldn't be called (Closed)

Created:
4 years ago by jbarboza
Modified:
3 years, 11 months ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

abort in delete operators that shouldn't be called Section 3.2 of the C++ standard states that destructor definitions implicitly "use" operator delete functions. Therefore, these operator delete functions must be defined even if they are never called by user code explicitly. http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#261 gcc allows them to remain as empty definitions. However, not all compilers allow this. (e.g. xlc on zOS) This pull request creates definitions which if ever called, result in an abort. R=danno@chromium.org,jochen@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2588433002 Cr-Commit-Position: refs/heads/master@{#41981} Committed: https://chromium.googlesource.com/v8/v8/+/224d3764e52fd4df91ece9274cee1305c3677286

Patch Set 1 #

Patch Set 2 : addressed comments #

Patch Set 3 : Add missing return types #

Patch Set 4 : add return statements required by some compilers #

Patch Set 5 : throw bad_alloc instead of returning null #

Patch Set 6 : declare new operators as noreturn #

Patch Set 7 : call abort to satisfy windows compiler #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -8 lines) Patch
M include/v8.h View 1 4 chunks +8 lines, -8 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 4 chunks +25 lines, -0 lines 0 comments Download

Messages

Total messages: 42 (30 generated)
jbarboza
Section 3.2 of the C++ standard states that destructor definitions implicitly "use" operator delete functions. ...
4 years ago (2016-12-16 22:32:15 UTC) #2
jochen (gone - plz use gerrit)
sorry, took me a while to locate all relevant sections in the spec. It's indeed ...
4 years ago (2016-12-19 15:47:54 UTC) #3
jbarboza
> Instead of implementing them to invoke abort, I'd propose to just not delete > ...
4 years ago (2016-12-19 17:13:14 UTC) #4
jochen (gone - plz use gerrit)
ok, lgtm with the operator new also being implemented to abort
4 years ago (2016-12-20 07:43:35 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2588433002/20001
3 years, 11 months ago (2016-12-28 16:04:25 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_avx2_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel_ng/builds/14351) v8_linux64_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
3 years, 11 months ago (2016-12-28 16:06:35 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2588433002/40001
3 years, 11 months ago (2016-12-28 16:26:45 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: v8_win_compile_dbg on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_compile_dbg/builds/30130) v8_win_nosnap_shared_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
3 years, 11 months ago (2016-12-28 16:29:55 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2588433002/60001
3 years, 11 months ago (2016-12-28 17:01:59 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_avx2_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel_ng/builds/14357) v8_linux64_gyp_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
3 years, 11 months ago (2016-12-28 17:04:30 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2588433002/120001
3 years, 11 months ago (2016-12-28 18:29:45 UTC) #39
commit-bot: I haz the power
3 years, 11 months ago (2016-12-28 18:48:35 UTC) #42
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/v8/v8/+/224d3764e52fd4df91ece9274cee1305c36...

Powered by Google App Engine
This is Rietveld 408576698