Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: base/process_util_posix.cc

Issue 1801007: POSIX: catch more crash-indicating signals for in-process crash dumping. (Closed)
Patch Set: add SIGSYS back Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_posix.cc
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc
index 17a461d90db88481e5a5b6c6970a808f40d9dd0d..2d65fad7a90d590f9b2123a66b31471f7690608e 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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698