Changeset 238478 in webkit
- Timestamp:
- Nov 25, 2018, 10:22:30 AM (6 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r238477 r238478 1 2018-11-25 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 We also have to define CRASH_UNDER_CONSTEXPR_CONTEXT(). It's a bit odd that it's possible to 18 use a non-constexpr function here, but it works. Currently this macro uses WTFCrash(), which 19 is also non-constexpr. 20 21 * wtf/Assertions.h: 22 1 23 2018-11-25 Michael Catanzaro <mcatanzaro@igalia.com> 2 24 -
trunk/Source/WTF/wtf/Assertions.h
r238477 r238478 45 45 #include <stdbool.h> 46 46 #include <stddef.h> 47 #include <stdlib.h> 47 48 #include <wtf/ExportMacros.h> 48 49 … … 240 241 __builtin_unreachable(); \ 241 242 } while (0) 243 #elif !ENABLE(DEVELOPER_MODE) && !OS(DARWIN) 244 #define CRASH() abort() 245 #define CRASH_UNDER_CONSTEXPR_CONTEXT() abort() 242 246 #else 243 247 #define CRASH() WTFCrash()
Note:
See TracChangeset
for help on using the changeset viewer.