diff options
Diffstat (limited to 'base/debug_util_mac.cc')
-rw-r--r-- | base/debug_util_mac.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/base/debug_util_mac.cc b/base/debug_util_mac.cc index 486d56a..77ab0ff 100644 --- a/base/debug_util_mac.cc +++ b/base/debug_util_mac.cc @@ -9,7 +9,10 @@ #include "base/basictypes.h" static void ExitSignalHandler(int sig) { - exit(128 + sig); + // A call to exit() can call atexit() handlers. If we SIGSEGV due + // to a corrupt heap, and if we have an atexit handler that + // allocates or frees memory, we are in trouble if we do not _exit. + _exit(128 + sig); } // static |