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) 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());