[compiler-rt] bb2e468 - [TSan] [Darwin] Fix off by one in TSAN init due to MemoryRangeIsAvailable (#169008)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 21 07:47:16 PST 2025
Author: Andrew Haberlandt
Date: 2025-11-21T07:47:11-08:00
New Revision: bb2e4686c1c8e4955ff5d18a7baaef3fe14ba36e
URL: https://github.com/llvm/llvm-project/commit/bb2e4686c1c8e4955ff5d18a7baaef3fe14ba36e
DIFF: https://github.com/llvm/llvm-project/commit/bb2e4686c1c8e4955ff5d18a7baaef3fe14ba36e.diff
LOG: [TSan] [Darwin] Fix off by one in TSAN init due to MemoryRangeIsAvailable (#169008)
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
index f6fe2405254e7..da735fba663aa 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
@@ -235,7 +235,7 @@ void InitializePlatformEarly() {
}
// In some configurations, the max_vm is expanded, but much of this space is
// already mapped. TSAN will not work in this configuration.
- if (!MemoryRangeIsAvailable(HiAppMemEnd() - 1, HiAppMemEnd())) {
+ if (!MemoryRangeIsAvailable(HiAppMemEnd() - 1, HiAppMemEnd() - 1)) {
Report(
"ThreadSanitizer: Unsupported virtual memory layout: Address %p is "
"already mapped.\n",
More information about the llvm-commits
mailing list