================
@@ -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)
----------------
ndrewh wrote:

IMO, it's clearer to have this define here in a header (which also contains 
many other platform-specific defines) rather than having to wrap a big if case 
with`#if SANITIZER_APPLE` in .asan_shadow_setup.cpp.

https://github.com/llvm/llvm-project/pull/217530
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to