[compiler-rt] [sanitizer_common][tsan] Improve message for unsupported vm config on Apple platforms (PR #158665)

Dan Blackwell via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 04:33:53 PDT 2025


================
@@ -226,9 +226,19 @@ static void ThreadTerminateCallback(uptr thread) {
 void InitializePlatformEarly() {
 #  if !SANITIZER_GO && SANITIZER_IOS
   uptr max_vm = GetMaxUserVirtualAddress() + 1;
-  if (max_vm != HiAppMemEnd()) {
-    Printf("ThreadSanitizer: unsupported vm address limit %p, expected %p.\n",
-           (void *)max_vm, (void *)HiAppMemEnd());
+  if (max_vm < HiAppMemEnd()) {
+    Printf(
----------------
DanBlackwell wrote:

It seems like [other fatal paths](https://github.com/ndrewh/llvm-project/blob/92ac79c6dc0c44016b4cb79246eec194248f785e/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp#L647) use `Report` (which goes to stderr rather than stdout), should we also be doing that here?

https://github.com/llvm/llvm-project/pull/158665


More information about the llvm-commits mailing list