Skip to content

Commit

Permalink
[NFC][msan] Mention sanitizer in error messages
Browse files Browse the repository at this point in the history
And remove spaces around '-' printing ranges.
  • Loading branch information
vitalybuka committed Jul 12, 2024
1 parent a853fe2 commit 79bd628
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions compiler-rt/lib/msan/msan_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ static bool CheckMemoryRangeAvailability(uptr beg, uptr size, bool verbose) {
uptr end = beg + size - 1;
if (!MemoryRangeIsAvailable(beg, end)) {
if (verbose)
Printf("FATAL: Memory range 0x%zx - 0x%zx is not available.\n", beg,
end);
Printf(
"FATAL: MemorySanitizer: Shadow range 0x%zx-0x%zx is not "
"available.\n",
beg, end);
return false;
}
}
Expand All @@ -72,8 +74,10 @@ static bool ProtectMemoryRange(uptr beg, uptr size, const char *name) {
}
if ((uptr)addr != beg) {
uptr end = beg + size - 1;
Printf("FATAL: Cannot protect memory range 0x%zx - 0x%zx (%s).\n", beg,
end, name);
Printf(
"FATAL: MemorySanitizer: Cannot protect memory range 0x%zx-0x%zx "
"(%s).\n",
beg, end, name);
return false;
}
}
Expand Down

0 comments on commit 79bd628

Please sign in to comment.