From 40f0c5cad3c32aff1080e8e401a554898967598d Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 6 Oct 2023 22:34:36 +0000 Subject: [PATCH] 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 --- core/config_sanitizers.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index 049e7ff5d2..83be00630f 100644 --- a/core/config_sanitizers.mk +++ b/core/config_sanitizers.mk @@ -404,7 +404,6 @@ ifneq ($(my_sanitize),) 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