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 @@ -32,7 +32,7 @@ "TSAN_OPTIONS=%s=0\n"; # if !SANITIZER_GO -static void DontDumpShadow(uptr addr, uptr size) { +void DontDumpShadow(uptr addr, uptr size) { if (common_flags()->use_madv_dontdump) if (!DontDumpShadowMemory(addr, size)) { Printf(kShadowMemoryMappingWarning, SanitizerToolName, addr, addr + size, Index: compiler-rt/lib/tsan/rtl/tsan_rtl.h =================================================================== --- compiler-rt/lib/tsan/rtl/tsan_rtl.h +++ compiler-rt/lib/tsan/rtl/tsan_rtl.h @@ -483,6 +483,7 @@ void DontNeedShadowFor(uptr addr, uptr size); void UnmapShadow(ThreadState *thr, uptr addr, uptr size); void InitializeShadowMemory(); +void DontDumpShadow(uptr addr, uptr size); void InitializeInterceptors(); void InitializeLibIgnore(); void InitializeDynamicAnnotations(); Index: compiler-rt/lib/tsan/rtl/tsan_rtl.cpp =================================================================== --- compiler-rt/lib/tsan/rtl/tsan_rtl.cpp +++ compiler-rt/lib/tsan/rtl/tsan_rtl.cpp @@ -213,6 +213,9 @@ #else auto resetFailed = !MmapFixedSuperNoReserve(shadow_begin, shadow_end-shadow_begin, "shadow"); +# if !SANITIZER_GO + DontDumpShadow(shadow_begin, shadow_end - shadow_begin); +# endif #endif if (resetFailed) { Printf("failed to reset shadow memory\n");