diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-12 14:03:40 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-12 14:03:40 +0000 |
commit | 0fd596bc7bc634fb11e3fd0e10917f8882c64617 (patch) | |
tree | 8c8929a5599f606c832cb6ff426ea64190dc579e /base | |
parent | 4855d16518287469163dc89daa3a95d5a50c04ae (diff) | |
download | chromium_src-0fd596bc7bc634fb11e3fd0e10917f8882c64617.zip chromium_src-0fd596bc7bc634fb11e3fd0e10917f8882c64617.tar.gz chromium_src-0fd596bc7bc634fb11e3fd0e10917f8882c64617.tar.bz2 |
Trim the list of signals used by debug_util::DisableOSCrashDumps() on Mac.
The list was too long and was catching signals corresponding to Mach
exceptions that Apple Crash Reporter never attempts to catch, and signals
that don't even map to Mach exceptions. The default signal handlers are fine
in these cases.
BUG=24568
TEST=Crash reporting still disabled when appropriate
(see chrome/app/chrome_dll_main.cc and the comment before
DisableOSCrashDumps in ChromeMain)
Specifically, with stats reporting disabled, about:crash should result in
a sad tab but no silent crash report generated in
~/Library/Logs/CrashReporter
Review URL: http://codereview.chromium.org/272025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28701 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/debug_util.h | 10 | ||||
-rw-r--r-- | base/debug_util_mac.cc | 25 |
2 files changed, 16 insertions, 19 deletions
diff --git a/base/debug_util.h b/base/debug_util.h index 11c1d7c..b9ece20 100644 --- a/base/debug_util.h +++ b/base/debug_util.h @@ -75,12 +75,10 @@ class DebugUtil { static void BreakDebugger(); #if defined(OS_MACOSX) - // On OS X, it can take a really long time for the OS Crash handler to - // process a Chrome crash. This translates into a long wait till the process - // actually dies. - // This method disables OS Crash reporting entireley. - // TODO(playmobil): Remove this when we have Breakpad integration enabled - - // see http://crbug.com/7652 + // On Mac OS X, it can take a really long time for the OS crash handler to + // process a Chrome crash when debugging symbols are available. This + // translates into a long wait until the process actually dies. This call + // disables Apple Crash Reporter entirely. static void DisableOSCrashDumps(); #endif // defined(OS_MACOSX) }; diff --git a/base/debug_util_mac.cc b/base/debug_util_mac.cc index 5a52387..486d56a 100644 --- a/base/debug_util_mac.cc +++ b/base/debug_util_mac.cc @@ -14,19 +14,18 @@ static void ExitSignalHandler(int sig) { // static void DebugUtil::DisableOSCrashDumps() { - int signals_to_intercept[] ={SIGINT, - SIGHUP, - SIGTERM, - SIGABRT, - SIGILL, - SIGTRAP, - SIGEMT, - SIGFPE, - SIGBUS, - SIGSEGV, - SIGSYS, - SIGXCPU, - SIGXFSZ}; + // These are the POSIX signals corresponding to the Mach exceptions that + // Apple Crash Reporter handles. See ux_exception() in xnu's + // bsd/uxkern/ux_exception.c and machine_exception() in xnu's + // bsd/dev/*/unix_signal.c. + const int signals_to_intercept[] ={ + SIGILL, // EXC_BAD_INSTRUCTION + SIGTRAP, // EXC_BREAKPOINT + SIGFPE, // EXC_ARITHMETIC + SIGBUS, // EXC_BAD_ACCESS + SIGSEGV // EXC_BAD_ACCESS + }; + // For all these signals, just wire things up so we exit immediately. for (size_t i = 0; i < arraysize(signals_to_intercept); ++i) { signal(signals_to_intercept[i], ExitSignalHandler); |