Skip to content

Commit 6dd1f08

Browse files
committed
[NFC][msan] Use %p to print addresses
1 parent ff8a03a commit 6dd1f08

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

compiler-rt/lib/msan/msan_linux.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace __msan {
4242
void ReportMapRange(const char *descr, uptr beg, uptr size) {
4343
if (size > 0) {
4444
uptr end = beg + size - 1;
45-
VPrintf(1, "%s : 0x%zx - 0x%zx\n", descr, beg, end);
45+
VPrintf(1, "%s : %p-%p\n", descr, (void *)beg, (void *)end);
4646
}
4747
}
4848

@@ -51,10 +51,8 @@ static bool CheckMemoryRangeAvailability(uptr beg, uptr size, bool verbose) {
5151
uptr end = beg + size - 1;
5252
if (!MemoryRangeIsAvailable(beg, end)) {
5353
if (verbose)
54-
Printf(
55-
"FATAL: MemorySanitizer: Shadow range 0x%zx-0x%zx is not "
56-
"available.\n",
57-
beg, end);
54+
Printf("FATAL: MemorySanitizer: Shadow range %p-%p is not available.\n",
55+
(void *)beg, (void *)end);
5856
return false;
5957
}
6058
}
@@ -75,9 +73,8 @@ static bool ProtectMemoryRange(uptr beg, uptr size, const char *name) {
7573
if ((uptr)addr != beg) {
7674
uptr end = beg + size - 1;
7775
Printf(
78-
"FATAL: MemorySanitizer: Cannot protect memory range 0x%zx-0x%zx "
79-
"(%s).\n",
80-
beg, end, name);
76+
"FATAL: MemorySanitizer: Cannot protect memory range %p-%p (%s).\n",
77+
(void *)beg, (void *)end);
8178
return false;
8279
}
8380
}

0 commit comments

Comments
 (0)