[compiler-rt] [sanitizers][Darwin][NFC] Insert missing void* casts for printf %p (PR #161282)
Andrew Haberlandt via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 30 10:23:25 PDT 2025
https://github.com/ndrewh updated https://github.com/llvm/llvm-project/pull/161282
>From 48284ad8b1ea3a4e092f7876ff6ca2ee334ee645 Mon Sep 17 00:00:00 2001
From: Andrew Haberlandt <ahaberlandt at apple.com>
Date: Mon, 29 Sep 2025 14:31:31 -0700
Subject: [PATCH] [sanitizers][Darwin][NFC] Insert missing void* casts for
printf %p
---
compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp | 10 +++++-----
compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
index 18ec1195e8eb0..721c39d427c4b 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
@@ -1147,8 +1147,8 @@ static void PrintVmmap() {
lastsz += vmsize;
} else {
if (lastsz)
- Printf("|| `[%p, %p]` || size=0x%016" PRIx64 " ||\n", last,
- last + lastsz, lastsz);
+ Printf("|| `[%p, %p]` || size=0x%016" PRIx64 " ||\n", (void*)last,
+ (void*)(last + lastsz), lastsz);
last = address;
lastsz = vmsize;
@@ -1158,8 +1158,8 @@ static void PrintVmmap() {
// We've reached the end of the memory map. Print the last remaining
// region, if there is one.
if (lastsz)
- Printf("|| `[%p, %p]` || size=0x%016" PRIx64 " ||\n", last,
- last + lastsz, lastsz);
+ Printf("|| `[%p, %p]` || size=0x%016" PRIx64 " ||\n", (void*)last,
+ (void*)(last + lastsz), lastsz);
break;
}
@@ -1170,7 +1170,7 @@ static void ReportShadowAllocFail(uptr shadow_size_bytes, uptr alignment) {
Report(
"FATAL: Failed to allocate shadow memory. Tried to allocate %p bytes "
"(alignment=%p).\n",
- shadow_size_bytes, alignment);
+ (void*)shadow_size_bytes, (void*)alignment);
PrintVmmap();
}
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
index 5e1ea06b6236e..62ab0554df08e 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
@@ -239,7 +239,7 @@ void InitializePlatformEarly() {
Report(
"ThreadSanitizer: Unsupported virtual memory layout: Address %p is "
"already mapped.\n",
- HiAppMemEnd() - 1);
+ (void*)(HiAppMemEnd() - 1));
Die();
}
#endif
More information about the llvm-commits
mailing list