diff options
author | 2024-05-16 22:15:18 +0000 | |
---|---|---|
committer | 2024-05-22 07:54:36 +0000 | |
commit | c82d3a69bdf3a95720e8e8b8d2b72cc4db19645c (patch) | |
tree | d24b4c780864f25cd3ac5e9d8faa2773fd021ba2 /libartbase/base/memory_tool.h | |
parent | 4d0b0469a97a0815f5df4707ece44412cce4ae5f (diff) |
Skip double-root update detection (in CMC GC) on HWASAN builds
We have to skip detection of double update on stack. But with HWASAN,
the comparison fails and we end up not excluding stack pointers. We can
safely skip not detecting double-root updates everywhere.
Test: manual
Bug: 335549484
Change-Id: I6281563f57584188565929f8a812371b094877ca
Diffstat (limited to 'libartbase/base/memory_tool.h')
-rw-r--r-- | libartbase/base/memory_tool.h | 2 |
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 |