summaryrefslogtreecommitdiffstats
path: root/base/debug_util_mac.cc
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 22:33:02 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 22:33:02 +0000
commit079487b08bf7867eb7c078b59dec61f142a42df2 (patch)
tree799f43c643be891b6715d83f24c12f7e788ffbd3 /base/debug_util_mac.cc
parent7e9d83720b3de5ad50219cfff016535132db642f (diff)
downloadchromium_src-079487b08bf7867eb7c078b59dec61f142a42df2.zip
chromium_src-079487b08bf7867eb7c078b59dec61f142a42df2.tar.gz
chromium_src-079487b08bf7867eb7c078b59dec61f142a42df2.tar.bz2
In a signal handler, call _exit, not exit.
I found a case of renderers trying to die in a signal handler but a corrupt heap (and some atexit() handlers installed by XmlSomething) made us hang forever. BUG=http://crbug.com/23590, http://crbug.com/23919, http://crbug.com/22287 (maybe) It isn't clear this fixes any known renderer hangs (e.g. the bugs above) but it's a step in the right direction. TEST=no known way to reliably hit this state. Review URL: http://codereview.chromium.org/261059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28750 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/debug_util_mac.cc')
-rw-r--r--base/debug_util_mac.cc5
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