[compiler-rt] 6dd1f08 - [NFC][msan] Use %p to print addresses
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 18:47:57 PDT 2024
Author: Vitaly Buka
Date: 2024-07-11T18:47:52-07:00
New Revision: 6dd1f080e16e44cdda1ac72b24e563a3a274d094
URL: https://github.com/llvm/llvm-project/commit/6dd1f080e16e44cdda1ac72b24e563a3a274d094
DIFF: https://github.com/llvm/llvm-project/commit/6dd1f080e16e44cdda1ac72b24e563a3a274d094.diff
LOG: [NFC][msan] Use %p to print addresses
Added:
Modified:
compiler-rt/lib/msan/msan_linux.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/msan/msan_linux.cpp b/compiler-rt/lib/msan/msan_linux.cpp
index 05bce561fee32..5daf9d8f110e8 100644
--- a/compiler-rt/lib/msan/msan_linux.cpp
+++ b/compiler-rt/lib/msan/msan_linux.cpp
@@ -42,7 +42,7 @@ namespace __msan {
void ReportMapRange(const char *descr, uptr beg, uptr size) {
if (size > 0) {
uptr end = beg + size - 1;
- VPrintf(1, "%s : 0x%zx - 0x%zx\n", descr, beg, end);
+ VPrintf(1, "%s : %p-%p\n", descr, (void *)beg, (void *)end);
}
}
@@ -51,10 +51,8 @@ static bool CheckMemoryRangeAvailability(uptr beg, uptr size, bool verbose) {
uptr end = beg + size - 1;
if (!MemoryRangeIsAvailable(beg, end)) {
if (verbose)
- Printf(
- "FATAL: MemorySanitizer: Shadow range 0x%zx-0x%zx is not "
- "available.\n",
- beg, end);
+ Printf("FATAL: MemorySanitizer: Shadow range %p-%p is not available.\n",
+ (void *)beg, (void *)end);
return false;
}
}
@@ -75,9 +73,8 @@ static bool ProtectMemoryRange(uptr beg, uptr size, const char *name) {
if ((uptr)addr != beg) {
uptr end = beg + size - 1;
Printf(
- "FATAL: MemorySanitizer: Cannot protect memory range 0x%zx-0x%zx "
- "(%s).\n",
- beg, end, name);
+ "FATAL: MemorySanitizer: Cannot protect memory range %p-%p (%s).\n",
+ (void *)beg, (void *)end);
return false;
}
}
More information about the llvm-commits
mailing list