Bug 184408 - CRASH() should call abort() except on Darwin and in developer builds
Summary: CRASH() should call abort() except on Darwin and in developer builds
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-08 20:50 PDT by Michael Catanzaro
Modified: 2018-11-25 10:22 PST (History)
9 users (show)

See Also:


Attachments
Patch (1.71 KB, patch)
2018-04-08 20:53 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff
Patch (2.06 KB, patch)
2018-11-25 08:27 PST, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2018-04-08 20:50:41 PDT
CRASH() should call abort() except on Darwin and in developer builds, as discussed at https://lists.webkit.org/pipermail/webkit-dev/2018-March/029903.html. This should be slightly nicer than dereferencing 0xbadbeef.

On Darwin, CRASH() uses a breakpoint trap, which seems to corrupt the stack on Linux, so we can't do that.

Continue to call WTFCrash() in developer mode, and make no changes to WTFCrash(), since it is reportedly useful in nightmare scenarios where core dumps are unavailable: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029907.html
Comment 1 Michael Catanzaro 2018-04-08 20:53:57 PDT
Created attachment 337478 [details]
Patch
Comment 2 Michael Catanzaro 2018-04-08 20:55:34 PDT
Comment on attachment 337478 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=337478&action=review

> Source/WTF/wtf/Assertions.h:234
> +#elif !ENABLE(DEVELOPER_MODE) && !OS(DARWIN)

Note that I don't check NDEBUG here specifically in order to allow Adrian to use WTFCrash() in "release" builds.
Comment 3 Michael Catanzaro 2018-05-21 08:26:24 PDT
Pinging GTK/WPE reviewers.
Comment 4 Michael Catanzaro 2018-11-23 11:52:46 PST
(In reply to Michael Catanzaro from comment #0)
> CRASH() should call abort() except on Darwin and in developer builds, as
> discussed at
> https://lists.webkit.org/pipermail/webkit-dev/2018-March/029903.html. This
> should be slightly nicer than dereferencing 0xbadbeef.

Ping any reviewers.
Comment 5 Daniel Bates 2018-11-23 20:13:54 PST
Comment on attachment 337478 [details]
Patch

OK
Comment 6 WebKit Commit Bot 2018-11-24 07:13:24 PST
Comment on attachment 337478 [details]
Patch

Clearing flags on attachment: 337478

Committed r238469: <https://trac.webkit.org/changeset/238469>
Comment 7 WebKit Commit Bot 2018-11-24 07:13:25 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-11-24 07:14:27 PST
<rdar://problem/46228007>
Comment 9 Michael Catanzaro 2018-11-25 08:22:52 PST
Reverted r238469 for reason:

Broke the build

Committed r238477: <https://trac.webkit.org/changeset/238477>
Comment 10 Michael Catanzaro 2018-11-25 08:27:50 PST
Created attachment 355596 [details]
Patch
Comment 11 WebKit Commit Bot 2018-11-25 10:22:38 PST
Comment on attachment 355596 [details]
Patch

Clearing flags on attachment: 355596

Committed r238478: <https://trac.webkit.org/changeset/238478>
Comment 12 WebKit Commit Bot 2018-11-25 10:22:40 PST
All reviewed patches have been landed.  Closing bug.