summaryrefslogtreecommitdiff
path: root/debuggerd/handler/debuggerd_handler.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2017-01-22 17:41:15 -0800
committerJosh Gao <jmgao@google.com>2017-01-23 11:34:49 -0800
commit575941115e46a60d4e41dfa5336572c603917a29 (patch)
tree0b1be6fcd5223fe7044276442e3f809260a5c57d /debuggerd/handler/debuggerd_handler.cpp
parentd20d687de57b989495f4826450ac79910a4686dc (diff)
crash_dump: clear the default crash handlers.
crash_dump is a dynamic executable that gets the default crash dumping handlers set by the linker. Turn them off to prevent crash_dump from dumping itself. Bug: http://b/34472671 Test: inserted an abort into crash_dump Change-Id: Ic9d708805ad47afbb2a9ff37e2ca059f23f421de
Diffstat (limited to 'debuggerd/handler/debuggerd_handler.cpp')
-rw-r--r--debuggerd/handler/debuggerd_handler.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/debuggerd/handler/debuggerd_handler.cpp b/debuggerd/handler/debuggerd_handler.cpp
index 83db3a745..c031046f2 100644
--- a/debuggerd/handler/debuggerd_handler.cpp
+++ b/debuggerd/handler/debuggerd_handler.cpp
@@ -367,15 +367,5 @@ void debuggerd_init(debuggerd_callbacks_t* callbacks) {
// Use the alternate signal stack if available so we can catch stack overflows.
action.sa_flags |= SA_ONSTACK;
-
- sigaction(SIGABRT, &action, nullptr);
- sigaction(SIGBUS, &action, nullptr);
- sigaction(SIGFPE, &action, nullptr);
- sigaction(SIGILL, &action, nullptr);
- sigaction(SIGSEGV, &action, nullptr);
-#if defined(SIGSTKFLT)
- sigaction(SIGSTKFLT, &action, nullptr);
-#endif
- sigaction(SIGTRAP, &action, nullptr);
- sigaction(DEBUGGER_SIGNAL, &action, nullptr);
+ debuggerd_register_handlers(&action);
}