Skip to content

Commit

Permalink
[tsan] Fix aarch64-*-linux after D86377
Browse files Browse the repository at this point in the history
All check-tsan tests fail on aarch64-*-linux because HeapMemEnd() > ShadowBeg()
for the following code path:
```
 #if defined(__aarch64__) && !HAS_48_BIT_ADDRESS_SPACE
   ProtectRange(HeapMemEnd(), ShadowBeg());
```

Restore the behavior before D86377 for aarch64-*-linux.
  • Loading branch information
MaskRay committed Mar 11, 2021
1 parent baf637d commit 5af991d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void CheckAndProtect() {
Die();
}

#if defined(__aarch64__) && !HAS_48_BIT_ADDRESS_SPACE
#if defined(__aarch64__) && defined(__APPLE__) && !HAS_48_BIT_ADDRESS_SPACE
ProtectRange(HeapMemEnd(), ShadowBeg());
ProtectRange(ShadowEnd(), MetaShadowBeg());
ProtectRange(MetaShadowEnd(), TraceMemBeg());
Expand Down

0 comments on commit 5af991d

Please sign in to comment.