Skip to content

Commit 6edbdf8

Browse files
committed
Revert "[compiler-rt][scudo] Add missing preprocessor token" and "[compiler-rt][scudo] Simplify TBI checks"
This reverts commit 676eaa2 and f6038cd since builders are still broken.
1 parent 676eaa2 commit 6edbdf8

File tree

1 file changed

+8
-5
lines changed
  • compiler-rt/lib/scudo/standalone

1 file changed

+8
-5
lines changed

compiler-rt/lib/scudo/standalone/memtag.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,19 @@
1818

1919
namespace scudo {
2020

21+
#if (__clang_major__ >= 12 && defined(__aarch64__) && !defined(__ILP32__)) || \
22+
defined(SCUDO_FUZZ)
23+
2124
// We assume that Top-Byte Ignore is enabled if the architecture supports memory
2225
// tagging. Not all operating systems enable TBI, so we only claim architectural
2326
// support for memory tagging if the operating system enables TBI.
2427
// HWASan uses the top byte for its own purpose and Scudo should not touch it.
25-
#if (__clang_major__ >= 12 && defined(__aarch64__) && !defined(__ILP32__) && \
26-
SCUDO_LINUX && !defined(SCUDO_DISABLE_TBI) && \
27-
!__has_feature(hwaddress_sanitizer)) || \
28-
defined(SCUDO_FUZZ)
29-
28+
#if SCUDO_LINUX && !defined(SCUDO_DISABLE_TBI) && \
29+
!__has_feature(hwaddress_sanitizer)
3030
inline constexpr bool archSupportsMemoryTagging() { return true; }
31+
#else
32+
inline constexpr bool archSupportsMemoryTagging() { return false; }
33+
#endif
3134

3235
inline constexpr uptr archMemoryTagGranuleSize() { return 16; }
3336

0 commit comments

Comments
 (0)