[compiler-rt] 039fd9a - [NFC] [hwasan] move prints closer together.

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 9 05:39:31 PDT 2021


Author: Florian Mayer
Date: 2021-09-09T13:39:11+01:00
New Revision: 039fd9af45b0d6e1a072e0006bb38dbf59728015

URL: https://github.com/llvm/llvm-project/commit/039fd9af45b0d6e1a072e0006bb38dbf59728015
DIFF: https://github.com/llvm/llvm-project/commit/039fd9af45b0d6e1a072e0006bb38dbf59728015.diff

LOG: [NFC] [hwasan] move prints closer together.

this makes the code slightly more readable.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D109442

Added: 
    

Modified: 
    compiler-rt/lib/hwasan/hwasan_report.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/hwasan/hwasan_report.cpp b/compiler-rt/lib/hwasan/hwasan_report.cpp
index 5beb25cd512fb..b5dd0ccd597a2 100644
--- a/compiler-rt/lib/hwasan/hwasan_report.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_report.cpp
@@ -681,11 +681,11 @@ void ReportTagMismatch(StackTrace *stack, uptr tagged_addr, uptr access_size,
       GetCurrentThread()->stack_allocations());
 
   Decorator d;
-  Printf("%s", d.Error());
   uptr untagged_addr = UntagAddr(tagged_addr);
   // TODO: when possible, try to print heap-use-after-free, etc.
   const char *bug_type = "tag-mismatch";
   uptr pc = GetTopPc(stack);
+  Printf("%s", d.Error());
   Report("ERROR: %s: %s on address %p at pc %p\n", SanitizerToolName, bug_type,
          untagged_addr, pc);
 


        


More information about the llvm-commits mailing list