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: I6c971920c8506f97133749aaddd73b8cea6a12bc
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 6329e97..6624d4b 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -86,7 +86,7 @@
memtagStackCommonFlags = []string{"-march=armv8-a+memtag", "-mllvm", "-dom-tree-reachability-max-bbs-to-explore=128"}
hostOnlySanitizeFlags = []string{"-fno-sanitize-recover=all"}
- deviceOnlySanitizeFlags = []string{"-fsanitize-trap=all", "-ftrap-function=abort"}
+ deviceOnlySanitizeFlags = []string{"-fsanitize-trap=all"}
noSanitizeLinkRuntimeFlag = "-fno-sanitize-link-runtime"
)