Skip to content

Commit b5f6ecd

Browse files
committed
[TSan] [Darwin] Fix off by one in TSAN init due to MemoryRangeIsAvailable (llvm#169008)
(cherry picked from commit bb2e468)
1 parent c501b4f commit b5f6ecd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ void InitializePlatformEarly() {
235235
}
236236
// In some configurations, the max_vm is expanded, but much of this space is
237237
// already mapped. TSAN will not work in this configuration.
238-
if (!MemoryRangeIsAvailable(HiAppMemEnd() - 1, HiAppMemEnd())) {
238+
if (!MemoryRangeIsAvailable(HiAppMemEnd() - 1, HiAppMemEnd() - 1)) {
239239
Report(
240240
"ThreadSanitizer: Unsupported virtual memory layout: Address %p is "
241241
"already mapped.\n",

0 commit comments

Comments
 (0)