Skip to content

Commit 4deb31f

Browse files
vitalybukaaaryanshukla
authored andcommitted
[NFC][msan] Mention sanitizer in error messages
And remove spaces around '-' printing ranges.
1 parent 812abfa commit 4deb31f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

compiler-rt/lib/msan/msan_linux.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ 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("FATAL: Memory range 0x%zx - 0x%zx is not available.\n", beg,
55-
end);
54+
Printf(
55+
"FATAL: MemorySanitizer: Shadow range 0x%zx-0x%zx is not "
56+
"available.\n",
57+
beg, end);
5658
return false;
5759
}
5860
}
@@ -72,8 +74,10 @@ static bool ProtectMemoryRange(uptr beg, uptr size, const char *name) {
7274
}
7375
if ((uptr)addr != beg) {
7476
uptr end = beg + size - 1;
75-
Printf("FATAL: Cannot protect memory range 0x%zx - 0x%zx (%s).\n", beg,
76-
end, name);
77+
Printf(
78+
"FATAL: MemorySanitizer: Cannot protect memory range 0x%zx-0x%zx "
79+
"(%s).\n",
80+
beg, end, name);
7781
return false;
7882
}
7983
}

0 commit comments

Comments
 (0)