summaryrefslogtreecommitdiffstats
path: root/debuggerd/handler/debuggerd_handler.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2017-04-27 16:50:38 -0700
committerJosh Gao <jmgao@google.com>2017-04-27 17:28:05 -0700
commite06f2a4886a237abbc203942c970e2fc528003da (patch)
tree2c11a30e50b1da37b49b058f27194faa24de144a /debuggerd/handler/debuggerd_handler.cpp
parenta0bf415cad6dddcc1cdb154a95c795b5a8ecb7aa (diff)
downloadsystem_core-e06f2a4886a237abbc203942c970e2fc528003da.tar.gz
system_core-e06f2a4886a237abbc203942c970e2fc528003da.tar.bz2
system_core-e06f2a4886a237abbc203942c970e2fc528003da.zip
debuggerd_handler: don't assume that abort message implies fatal.
Applications can set abort messages via android_set_abort_message without actually aborting. This leads to following non-fatal dumps printing their output to logcat in the same format as a regular crash. Bug: http://b/37754992 Test: debuggerd_test Change-Id: I9c5e942984dfda36448860202b0ff1c2950bdd07
Diffstat (limited to 'debuggerd/handler/debuggerd_handler.cpp')
-rw-r--r--debuggerd/handler/debuggerd_handler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/debuggerd/handler/debuggerd_handler.cpp b/debuggerd/handler/debuggerd_handler.cpp
index cd00dc5e5..b70554f66 100644
--- a/debuggerd/handler/debuggerd_handler.cpp
+++ b/debuggerd/handler/debuggerd_handler.cpp
@@ -389,8 +389,9 @@ static void debuggerd_signal_handler(int signal_number, siginfo_t* info, void* c
log_signal_summary(signal_number, info);
- // Populate si_value with the abort message address, if found.
- if (abort_message) {
+ // If this was a fatal crash, populate si_value with the abort message address if possible.
+ // Note that applications can set an abort message without aborting.
+ if (abort_message && signal_number != DEBUGGER_SIGNAL) {
info->si_value.sival_ptr = abort_message;
}