[compiler-rt] 79bd628 - [NFC][msan] Mention sanitizer in error messages

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 18:39:12 PDT 2024


Author: Vitaly Buka
Date: 2024-07-11T18:38:21-07:00
New Revision: 79bd6287a9075efd6ef18755d27c540e744a892c

URL: https://github.com/llvm/llvm-project/commit/79bd6287a9075efd6ef18755d27c540e744a892c
DIFF: https://github.com/llvm/llvm-project/commit/79bd6287a9075efd6ef18755d27c540e744a892c.diff

LOG: [NFC][msan] Mention sanitizer in error messages

And remove spaces around '-' printing ranges.

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 708a06d59a347..05bce561fee32 100644
--- a/compiler-rt/lib/msan/msan_linux.cpp
+++ b/compiler-rt/lib/msan/msan_linux.cpp
@@ -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;
     }
   }
@@ -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;
     }
   }


        


More information about the llvm-commits mailing list