[compiler-rt] 9aa55b2 - [sanitizer] Capitalize HINT in reports (#195734)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 14:53:24 PDT 2026


Author: Vitaly Buka
Date: 2026-05-04T21:53:19Z
New Revision: 9aa55b291e6da18432f2c502367daa9a3ff4642e

URL: https://github.com/llvm/llvm-project/commit/9aa55b291e6da18432f2c502367daa9a3ff4642e
DIFF: https://github.com/llvm/llvm-project/commit/9aa55b291e6da18432f2c502367daa9a3ff4642e.diff

LOG: [sanitizer] Capitalize HINT in reports (#195734)

Consistency with other sanitizer reports which use uppercase "HINT:".

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
    compiler-rt/lib/tsan/rtl/tsan_report.cpp
    compiler-rt/test/asan/TestCases/Posix/high-address-dereference.c
    compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
index 351e00db6fb2d..0f553a05b2326 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
@@ -184,7 +184,7 @@ static void MaybeReportNonExecRegion(uptr pc) {
   MemoryMappedSegment segment;
   while (proc_maps.Next(&segment)) {
     if (pc >= segment.start && pc < segment.end && !segment.IsExecutable())
-      Report("Hint: PC is at a non-executable region. Maybe a wild jump?\n");
+      Report("HINT: PC is at a non-executable region. Maybe a wild jump?\n");
   }
 #endif
 }
@@ -254,7 +254,7 @@ static void ReportDeadlySignalImpl(const SignalContext &sig, u32 tid,
            (void *)sig.bp, (void *)sig.sp, tid);
   Printf("%s", d.Default());
   if (sig.pc < GetPageSizeCached())
-    Report("Hint: pc points to the zero page.\n");
+    Report("HINT: pc points to the zero page.\n");
   if (sig.is_memory_access) {
     const char *access_type =
         sig.write_flag == SignalContext::Write
@@ -262,11 +262,12 @@ static void ReportDeadlySignalImpl(const SignalContext &sig, u32 tid,
             : (sig.write_flag == SignalContext::Read ? "READ" : "UNKNOWN");
     Report("The signal is caused by a %s memory access.\n", access_type);
     if (!sig.is_true_faulting_addr)
-      Report("Hint: this fault was caused by a dereference of a high value "
-             "address (see register values below).  Disassemble the provided "
-             "pc to learn which register was used.\n");
+      Report(
+          "HINT: this fault was caused by a dereference of a high value "
+          "address (see register values below).  Disassemble the provided "
+          "pc to learn which register was used.\n");
     else if (sig.addr < GetPageSizeCached())
-      Report("Hint: address points to the zero page.\n");
+      Report("HINT: address points to the zero page.\n");
   }
   MaybeReportNonExecRegion(sig.pc);
   InternalMmapVector<BufferedStackTrace> stack_buffer(1);

diff  --git a/compiler-rt/lib/tsan/rtl/tsan_report.cpp b/compiler-rt/lib/tsan/rtl/tsan_report.cpp
index 22ba428cc58b7..17fd3064fb85a 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_report.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_report.cpp
@@ -317,8 +317,9 @@ void PrintReport(const ReportDesc *rep) {
       } else {
         PrintStack(rep->stacks[i]);
         if (i == 0)
-          Printf("    Hint: use TSAN_OPTIONS=second_deadlock_stack=1 "
-                 "to get more informative warning message\n\n");
+          Printf(
+              "    HINT: use TSAN_OPTIONS=second_deadlock_stack=1 "
+              "to get more informative warning message\n\n");
       }
     }
   } else {

diff  --git a/compiler-rt/test/asan/TestCases/Posix/high-address-dereference.c b/compiler-rt/test/asan/TestCases/Posix/high-address-dereference.c
index 37a7b1702e982..8d4b6c35a3049 100644
--- a/compiler-rt/test/asan/TestCases/Posix/high-address-dereference.c
+++ b/compiler-rt/test/asan/TestCases/Posix/high-address-dereference.c
@@ -27,14 +27,14 @@ int main(int argc, const char *argv[]) {
 // HIGH:  {{BUS|SEGV}} on unknown address (pc
 // MAX:   {{BUS|SEGV}} on unknown address (pc
 
-// HINT-PAGE0-NOT: Hint: this fault was caused by a dereference of a high value address
-// HINT-PAGE0:     Hint: address points to the zero page.
+// HINT-PAGE0-NOT: HINT: this fault was caused by a dereference of a high value address
+// HINT-PAGE0:     HINT: address points to the zero page.
 
-// HINT-NONE-NOT:  Hint: this fault was caused by a dereference of a high value address
-// HINT-NONE-NOT:  Hint: address points to the zero page.
+// HINT-NONE-NOT:  HINT: this fault was caused by a dereference of a high value address
+// HINT-NONE-NOT:  HINT: address points to the zero page.
 
-// HINT-HIGHADDR:     Hint: this fault was caused by a dereference of a high value address
-// HINT-HIGHADDR-NOT: Hint: address points to the zero page.
+// HINT-HIGHADDR:     HINT: this fault was caused by a dereference of a high value address
+// HINT-HIGHADDR-NOT: HINT: address points to the zero page.
 
 // ZERO:  SCARINESS: 10 (null-deref)
 // LOW1:  SCARINESS: 10 (null-deref)

diff  --git a/compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp b/compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp
index 10e56635ac02f..de9fe32c8b0f1 100644
--- a/compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp
@@ -22,7 +22,7 @@ int main() {
   *(volatile int*)0 = 42;
   // CHECK: ERROR: AddressSanitizer: access-violation on unknown address
   // CHECK: The signal is caused by a WRITE memory access.
-  // CHECK: Hint: address points to the zero page.
+  // CHECK: HINT: address points to the zero page.
   // CHECK: {{WARNING: .*DbgHelp}}
   // CHECK: {{WARNING: Failed to use and restart external symbolizer}}
   // CHECK: {{#0 0x.* in main.*report_after_syminitialize.cpp:}}[[@LINE-6]]


        


More information about the llvm-commits mailing list