summaryrefslogtreecommitdiff
path: root/libartbase/base/memory_tool.h
diff options
context:
space:
mode:
Diffstat (limited to 'libartbase/base/memory_tool.h')
-rw-r--r--libartbase/base/memory_tool.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libartbase/base/memory_tool.h b/libartbase/base/memory_tool.h
index 675ceb2cfd..4a93a9642f 100644
--- a/libartbase/base/memory_tool.h
+++ b/libartbase/base/memory_tool.h
@@ -68,10 +68,12 @@ constexpr size_t kMemoryToolStackGuardSizeScale = 1;
#if __has_feature(hwaddress_sanitizer)
# define HWADDRESS_SANITIZER
+constexpr bool kHwAsanEnabled = true;
// NB: The attribute also implies NO_INLINE. If inlined, the hwasan attribute would be lost.
// If method is also separately marked as ALWAYS_INLINE, the NO_INLINE takes precedence.
# define ATTRIBUTE_NO_SANITIZE_HWADDRESS __attribute__((no_sanitize("hwaddress"), noinline))
#else
+constexpr bool kHwAsanEnabled = false;
# define ATTRIBUTE_NO_SANITIZE_HWADDRESS
#endif