Have the sanitizers trap rather than abort.
abort() seems friendlier, but in practice it puts a couple of irrelevant
libc.so frames on the top of the stack trace and clobbers all the
registers that might have helped remotely debug a sanitizer failure.
Let's switch to trapping directly in the sanitized code instead.
Bug: http://b/298741930
Test: treehugger
Change-Id: I4fca63cb42bfba16a934c1fa88b08697faf3be41
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk
index 049e7ff..83be006 100644
--- a/core/config_sanitizers.mk
+++ b/core/config_sanitizers.mk
@@ -404,7 +404,6 @@
my_ldflags += -fsanitize=$(fsanitize_arg)
else
my_cflags += -fsanitize-trap=all
- my_cflags += -ftrap-function=abort
ifneq ($(filter address thread,$(my_sanitize)),)
my_cflags += -fno-sanitize-trap=address,thread
my_shared_libraries += libdl