Skip to content

Commit bb2e468

Browse files
authored
[TSan] [Darwin] Fix off by one in TSAN init due to MemoryRangeIsAvailable (#169008)
1 parent 4538818 commit bb2e468

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)