ART: Let ASAN handle stack traces on host

When running sanitized, do not install the unexpected-signal handler.
It is sometimes flaky. Instead let ASAN deal with this.

Bug: 31098551
Test: SANITIZE_HOST=address m test-art-host
Change-Id: I25897837fc0164047466c17de5c930121a433163
diff --git a/runtime/runtime_linux.cc b/runtime/runtime_linux.cc
index 424dcf8..6313553 100644
--- a/runtime/runtime_linux.cc
+++ b/runtime/runtime_linux.cc
@@ -20,6 +20,7 @@
 
 #include <iostream>
 
+#include "base/memory_tool.h"
 #include "runtime_common.h"
 
 namespace art {
@@ -63,6 +64,16 @@
 }
 
 void Runtime::InitPlatformSignalHandlers() {
+  constexpr bool kIsASAN =
+#ifdef ADDRESS_SANITIZER
+      true;
+#else
+      false;
+#endif
+  if (!kIsTargetBuild && kIsASAN) {
+    // (Temporarily) try and let ASAN print abort stacks, as our code sometimes fails. b/31098551
+    return;
+  }
   // On the host, we don't have debuggerd to dump a stack for us when something unexpected happens.
   InitPlatformSignalHandlersCommon(HandleUnexpectedSignalLinux,
                                    nullptr,