diff options
author | Vitaly Buka <vitalybuka@google.com> | 2023-12-21 12:37:17 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-21 12:37:17 -0800 |
commit | 528150b90bb54618b5cceddb85601718c2346f3f (patch) | |
tree | 8634c5401bd486c6f205a32ec42c26b0b8026ce5 | |
parent | 1830fadb78be9993cfeeaa7fb6867c3df1a53a8b (diff) |
[hwasan] Separate sections in report (#76130)
It makes them easier to read.
-rw-r--r-- | compiler-rt/lib/hwasan/hwasan_report.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler-rt/lib/hwasan/hwasan_report.cpp b/compiler-rt/lib/hwasan/hwasan_report.cpp index 5e8aa315801b..bbe89112e4db 100644 --- a/compiler-rt/lib/hwasan/hwasan_report.cpp +++ b/compiler-rt/lib/hwasan/hwasan_report.cpp @@ -233,7 +233,7 @@ static void PrintStackAllocations(const StackAllocationsRingBuffer *sa, if (obj_offset >= local.size) continue; if (!found_local) { - Printf("Potentially referenced stack objects:\n"); + Printf("\nPotentially referenced stack objects:\n"); found_local = true; } Printf(" %s in %s %s:%d\n", local.name, local.function_name, @@ -363,7 +363,7 @@ static void PrintTagsAroundAddr(uptr addr, GetTag get_tag, InternalScopedString s; addr = MemToShadow(addr); s.AppendF( - "Memory tags around the buggy address (one tag corresponds to %zd " + "\nMemory tags around the buggy address (one tag corresponds to %zd " "bytes):\n", kShadowAlignment); PrintTagInfoAroundAddr(addr, kShadowLines, s, @@ -803,8 +803,10 @@ void BaseReport::PrintAddressDescription() const { } // Print the remaining threads, as an extra information, 1 line per thread. - if (flags()->print_live_threads_info) + if (flags()->print_live_threads_info) { + Printf("\n"); hwasanThreadList().VisitAllLiveThreads([&](Thread *t) { t->Announce(); }); + } if (!num_descriptions_printed) // We exhausted our possibilities. Bail out. @@ -1020,7 +1022,7 @@ void ReportTagMismatch(StackTrace *stack, uptr tagged_addr, uptr access_size, // See the frame breakdown defined in __hwasan_tag_mismatch (from // hwasan_tag_mismatch_{aarch64,riscv64}.S). void ReportRegisters(const uptr *frame, uptr pc) { - Printf("Registers where the failure occurred (pc %p):\n", pc); + Printf("\nRegisters where the failure occurred (pc %p):\n", pc); // We explicitly print a single line (4 registers/line) each iteration to // reduce the amount of logcat error messages printed. Each Printf() will |