summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 06:24:37 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 06:24:37 +0000
commit7e868c9633b4d6f41c8d559625b69ef9fece5b8b (patch)
treec4497cb4994e446d3a71cdaf73b14ad2fbaf885b
parent0a5893a88936f38cbf8646ed7a06f1c19a289341 (diff)
downloadchromium_src-7e868c9633b4d6f41c8d559625b69ef9fece5b8b.zip
chromium_src-7e868c9633b4d6f41c8d559625b69ef9fece5b8b.tar.gz
chromium_src-7e868c9633b4d6f41c8d559625b69ef9fece5b8b.tar.bz2
POSIX: catch more crash-indicating signals for in-process crash dumping.
TEST=none BUG=none Review URL: http://codereview.chromium.org/1801007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46043 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/process_util_posix.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc
index 17a461d..2d65fad 100644
--- a/base/process_util_posix.cc
+++ b/base/process_util_posix.cc
@@ -102,6 +102,7 @@ int WaitpidWithTimeout(ProcessHandle handle, int64 wait_milliseconds,
}
void StackDumpSignalHandler(int signal) {
+ LOG(ERROR) << "Received signal " << signal;
StackTrace().PrintBacktrace();
_exit(1);
}
@@ -592,11 +593,13 @@ bool EnableInProcessStackDumping() {
sigemptyset(&action.sa_mask);
bool success = (sigaction(SIGPIPE, &action, NULL) == 0);
- // TODO(phajdan.jr): Catch other crashy signals, like SIGABRT.
- success &= (signal(SIGSEGV, &StackDumpSignalHandler) != SIG_ERR);
success &= (signal(SIGILL, &StackDumpSignalHandler) != SIG_ERR);
- success &= (signal(SIGBUS, &StackDumpSignalHandler) != SIG_ERR);
+ success &= (signal(SIGABRT, &StackDumpSignalHandler) != SIG_ERR);
success &= (signal(SIGFPE, &StackDumpSignalHandler) != SIG_ERR);
+ success &= (signal(SIGBUS, &StackDumpSignalHandler) != SIG_ERR);
+ success &= (signal(SIGSEGV, &StackDumpSignalHandler) != SIG_ERR);
+ success &= (signal(SIGSYS, &StackDumpSignalHandler) != SIG_ERR);
+
return success;
}