summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2019-03-15 15:10:24 -0700
committerJosh Gao <jmgao@google.com>2019-03-18 14:39:47 -0700
commit5e8d68c2b22553c44d64e41b96833da770d1f109 (patch)
treeebafe8075730d9fcdc6925b97e3ac06efdb958e4
parenteecd5cc53255a2986b094ecca2fe26976dfce768 (diff)
downloadsystem_core-5e8d68c2b22553c44d64e41b96833da770d1f109.tar.gz
system_core-5e8d68c2b22553c44d64e41b96833da770d1f109.tar.bz2
system_core-5e8d68c2b22553c44d64e41b96833da770d1f109.zip
debuggerd_handler: demote abort on exec failure to log.
If a process is ptraced already, we might not be able to exec crash_dump due to selinux. Since we can be called for non-fatal events, we shouldn't abort in that case. Bug: http://b/128054996 Test: treehugger Change-Id: I1442041caa7af908df2ab87b9e010c44082e7587
-rw-r--r--debuggerd/handler/debuggerd_handler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/debuggerd/handler/debuggerd_handler.cpp b/debuggerd/handler/debuggerd_handler.cpp
index a064ca0f7..bca5e36d5 100644
--- a/debuggerd/handler/debuggerd_handler.cpp
+++ b/debuggerd/handler/debuggerd_handler.cpp
@@ -383,7 +383,9 @@ static int debuggerd_dispatch_pseudothread(void* arg) {
execle(CRASH_DUMP_PATH, CRASH_DUMP_NAME, main_tid, pseudothread_tid, debuggerd_dump_type,
nullptr, nullptr);
- fatal_errno("exec failed");
+ async_safe_format_log(ANDROID_LOG_FATAL, "libc", "failed to exec crash_dump helper: %s",
+ strerror(errno));
+ return 1;
}
input_write.reset();