[llvm-branch-commits] [compiler-rt] [ASan][Darwin] Support gapless shadow layout for iOS 27.0 (PR #217530)
Vitaly Buka via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Aug 21 16:58:56 PDT 2026
================
@@ -314,6 +314,15 @@ extern uptr kHighMemEnd, kMidMemBeg, kMidMemEnd; // Initialized in __asan_init.
# define kMidShadowBeg MEM_TO_SHADOW(kMidMemBeg)
# define kMidShadowEnd MEM_TO_SHADOW(kMidMemEnd)
+// If the first byte of shadow can be placed after the last byte of app mem,
+// we don't need a gap since the shadow's shadow won't be in the middle
+// of app mem.
+# if SANITIZER_APPLE
+# define kGaplessShadow (kLowShadowBeg > kHighMemEnd)
----------------
vitalybuka wrote:
can you avoid this define and just inline checks there?
https://github.com/llvm/llvm-project/pull/217530
More information about the llvm-branch-commits
mailing list