[scudo] Fix running tests under hwasan.
When built with hwasan, assume that the target architecture does not support TBI. HWASan uses that byte for its own purpose, and changing it breaks things. Reviewed By: hctim Differential Revision: https://reviews.llvm.org/D111842
This commit is contained in:
parent
7a3fb71c3c
commit
439e00a25b
|
|
@ -23,7 +23,9 @@ namespace scudo {
|
|||
// We assume that Top-Byte Ignore is enabled if the architecture supports memory
|
||||
// tagging. Not all operating systems enable TBI, so we only claim architectural
|
||||
// support for memory tagging if the operating system enables TBI.
|
||||
#if SCUDO_LINUX && !defined(SCUDO_DISABLE_TBI)
|
||||
// HWASan uses the top byte for its own purpose and Scudo should not touch it.
|
||||
#if SCUDO_LINUX && !defined(SCUDO_DISABLE_TBI) && \
|
||||
!__has_feature(hwaddress_sanitizer)
|
||||
inline constexpr bool archSupportsMemoryTagging() { return true; }
|
||||
#else
|
||||
inline constexpr bool archSupportsMemoryTagging() { return false; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue