Disable ASAN for ExecuteSwitchImplCpp
ASAN bloats this function enormously and causes it to overflow the
Wframe-larger-than size. This disables the ASAN checks in this
function until we find a better way to fix this.
Test: SANITIZE_HOST=address ASAN_OPTIONS=detect_leaks=0 ./test.py --host
Bug: 73255278
Bug: 111357976
Bug: 117341496
Change-Id: I724b805727514a512cf658759d4e90610f39cbfa
diff --git a/runtime/interpreter/interpreter_switch_impl.cc b/runtime/interpreter/interpreter_switch_impl.cc
index c4b03b2..cb64ff4 100644
--- a/runtime/interpreter/interpreter_switch_impl.cc
+++ b/runtime/interpreter/interpreter_switch_impl.cc
@@ -17,6 +17,7 @@
#include "interpreter_switch_impl.h"
#include "base/enums.h"
+#include "base/memory_tool.h"
#include "base/quasi_atomic.h"
#include "dex/dex_file_types.h"
#include "experimental_flags.h"
@@ -256,8 +257,11 @@
}
}
+// TODO On ASAN builds this function gets a huge stack frame. Since normally we run in the mterp
+// this shouldn't cause any problems for stack overflow detection. Remove this once b/117341496 is
+// fixed.
template<bool do_access_check, bool transaction_active>
-void ExecuteSwitchImplCpp(SwitchImplContext* ctx) {
+ATTRIBUTE_NO_SANITIZE_ADDRESS void ExecuteSwitchImplCpp(SwitchImplContext* ctx) {
Thread* self = ctx->self;
const CodeItemDataAccessor& accessor = ctx->accessor;
ShadowFrame& shadow_frame = ctx->shadow_frame;