[PATCH] D86377: [tsan] Use large address space mapping on Apple Silicon Macs

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 15:07:40 PDT 2020


kubamracek created this revision.
kubamracek added reviewers: dvyukov, delcypher, yln.
kubamracek added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
kubamracek requested review of this revision.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86377

Files:
  compiler-rt/lib/tsan/rtl/tsan_platform.h
  compiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp


Index: compiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp
===================================================================
--- compiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp
+++ compiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp
@@ -99,7 +99,8 @@
     Die();
   }
 
-#if defined(__aarch64__) && defined(__APPLE__)
+#if defined(__aarch64__) && SANITIZER_MAC && \
+    (SANITIZER_IOS && !SANITIZER_IOSSIM)
   ProtectRange(HeapMemEnd(), ShadowBeg());
   ProtectRange(ShadowEnd(), MetaShadowBeg());
   ProtectRange(MetaShadowEnd(), TraceMemBeg());
Index: compiler-rt/lib/tsan/rtl/tsan_platform.h
===================================================================
--- compiler-rt/lib/tsan/rtl/tsan_platform.h
+++ compiler-rt/lib/tsan/rtl/tsan_platform.h
@@ -25,7 +25,8 @@
 
 #if !SANITIZER_GO
 
-#if defined(__x86_64__)
+#if defined(__x86_64__) || (SANITIZER_MAC && \
+    !(SANITIZER_IOS && !SANITIZER_IOSSIM))
 /*
 C/C++ on linux/x86_64 and freebsd/x86_64
 0000 0000 1000 - 0080 0000 0000: main binary and/or MAP_32BIT mappings (512GB)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86377.287120.patch
Type: text/x-patch
Size: 1035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200821/281ed888/attachment.bin>


More information about the llvm-commits mailing list