Ignore:
Timestamp:
Nov 21, 2008, 1:20:41 PM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Dan Bernstein.

https://bugs.webkit.org/show_bug.cgi?id=22402
Replace abort() with CRASH()

  • wtf/Assertions.h: Added a different method to crash, which should work even is 0xbbadbeef is a valid memory address.
  • runtime/Collector.cpp:
  • wtf/FastMalloc.cpp:
  • wtf/FastMalloc.h:
  • wtf/TCSpinLock.h: Replace abort() with CRASH().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/Assertions.h

    r38672 r38673  
    121121
    122122#ifndef CRASH
    123 #define CRASH() *(int *)(uintptr_t)0xbbadbeef = 0
     123#define CRASH() do { \
     124    *(int *)(uintptr_t)0xbbadbeef = 0; \
     125    ((void(*)())0)(); /* More reliable, but doesn't say BBADBEEF */ \
     126} while(false)
    124127#endif
    125128
Note: See TracChangeset for help on using the changeset viewer.