Skip to content

Commit bf8d52f

Browse files
committed
Update tsan_platform_mac.cpp to use new CheckAndProtect semantics.
The overall behavior is unchanged for Mac (i.e., there is no re-exec added).
1 parent 479ac09 commit bf8d52f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,10 @@ static uptr longjmp_xor_key = 0;
239239
void InitializePlatform() {
240240
DisableCoreDumperIfNecessary();
241241
#if !SANITIZER_GO
242-
CheckAndProtect();
242+
if (!CheckAndProtect(true, true, true)) {
243+
Printf("FATAL: ThreadSanitizer: found incompatible memory layout.\n");
244+
Die();
245+
}
243246

244247
InitializeThreadStateStorage();
245248

0 commit comments

Comments
 (0)