[compiler-rt] 6edbdf8 - Revert "[compiler-rt][scudo] Add missing preprocessor token" and "[compiler-rt][scudo] Simplify TBI checks"

Leonard Chan via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 11:31:42 PDT 2022


Author: Leonard Chan
Date: 2022-05-24T11:30:31-07:00
New Revision: 6edbdf80cac119f8f30d2ae6fa2972d9e778510b

URL: https://github.com/llvm/llvm-project/commit/6edbdf80cac119f8f30d2ae6fa2972d9e778510b
DIFF: https://github.com/llvm/llvm-project/commit/6edbdf80cac119f8f30d2ae6fa2972d9e778510b.diff

LOG: Revert "[compiler-rt][scudo] Add missing preprocessor token" and "[compiler-rt][scudo] Simplify TBI checks"

This reverts commit 676eaa2ca967ca6ad4a84d31d6f0ebabdcf3e44b
and f6038cdca03115da22b9e6ada5c25de4df5f42d2 since builders are still
broken.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/memtag.h b/compiler-rt/lib/scudo/standalone/memtag.h
index d65e76ad4ffcd..7f14a30fee12b 100644
--- a/compiler-rt/lib/scudo/standalone/memtag.h
+++ b/compiler-rt/lib/scudo/standalone/memtag.h
@@ -18,16 +18,19 @@
 
 namespace scudo {
 
+#if (__clang_major__ >= 12 && defined(__aarch64__) && !defined(__ILP32__)) ||  \
+    defined(SCUDO_FUZZ)
+
 // 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.
 // HWASan uses the top byte for its own purpose and Scudo should not touch it.
-#if (__clang_major__ >= 12 && defined(__aarch64__) && !defined(__ILP32__) &&   \
-     SCUDO_LINUX && !defined(SCUDO_DISABLE_TBI) &&                             \
-     !__has_feature(hwaddress_sanitizer)) ||                                   \
-    defined(SCUDO_FUZZ)
-
+#if SCUDO_LINUX && !defined(SCUDO_DISABLE_TBI) &&                              \
+    !__has_feature(hwaddress_sanitizer)
 inline constexpr bool archSupportsMemoryTagging() { return true; }
+#else
+inline constexpr bool archSupportsMemoryTagging() { return false; }
+#endif
 
 inline constexpr uptr archMemoryTagGranuleSize() { return 16; }
 


        


More information about the llvm-commits mailing list