⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 238469 in webkit


Ignore:
Timestamp:
Nov 24, 2018, 7:13:15 AM (8 years ago)
Author:
Michael Catanzaro
Message:

CRASH() should call abort() except on Darwin and in developer builds
https://bugs.webkit.org/show_bug.cgi?id=184408

Reviewed by Daniel Bates.

CRASH() should call abort() except on Darwin and in developer builds, as discussed on
webkit-dev. 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.

  • wtf/Assertions.h:
Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r238467 r238469  
     12018-11-24  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        CRASH() should call abort() except on Darwin and in developer builds
     4        https://bugs.webkit.org/show_bug.cgi?id=184408
     5
     6        Reviewed by Daniel Bates.
     7
     8        CRASH() should call abort() except on Darwin and in developer builds, as discussed on
     9        webkit-dev. This should be slightly nicer than dereferencing 0xbadbeef.
     10
     11        On Darwin, CRASH() uses a breakpoint trap, which seems to corrupt the stack on Linux, so we
     12        can't do that.
     13
     14        Continue to call WTFCrash() in developer mode, and make no changes to WTFCrash(), since it
     15        is reportedly useful in nightmare scenarios where core dumps are unavailable.
     16
     17        * wtf/Assertions.h:
     18
    1192018-11-23  Sam Weinig  <sam@webkit.org>
    220
  • trunk/Source/WTF/wtf/Assertions.h

    r237266 r238469  
    4545#include <stdbool.h>
    4646#include <stddef.h>
     47#include <stdlib.h>
    4748#include <wtf/ExportMacros.h>
    4849
     
    240241    __builtin_unreachable(); \
    241242} while (0)
     243#elif !ENABLE(DEVELOPER_MODE) && !OS(DARWIN)
     244#define CRASH() abort()
    242245#else
    243246#define CRASH() WTFCrash()
Note: See TracChangeset for help on using the changeset viewer.