[PATCH] D70707: [hwasan] Make memory dump same as the one in asan.
Martin Liška via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 26 01:29:29 PST 2019
marxin created this revision.
marxin added reviewers: kcc, vitalybuka.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
marxin added a comment.
Old report look:
Memory tags around the buggy address (one tag corresponds to 16 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=> d7 00 [08] 00 00 00 00 00 00 00 00 00 00 00 00 00 <=
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Tags for short granules around the buggy address (one tag corresponds to 16 bytes):
.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
=> .. .. [be] .. .. .. .. .. .. .. .. .. .. .. .. .. <=
.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
New report look:
Thread: T0 0xeffe00002000 stack: [0xffffc1759000,0xffffc1f59000) sz: 8388608 tls: [0xffff911ced20,0xffff911cf470)
Memory tags around the buggy address (one tag corresponds to 16 bytes):
0xfefceffffd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffd90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffda0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffdb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffdc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffdd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffde0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffdf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0xfefceffffe00: 3f 00 [8c] 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffe10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffe20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffe30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffe40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffe50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffe60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffe70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfefceffffe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Tags for short granules around the buggy address (one tag corresponds to 16 bytes):
0xfefceffffdf0: .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
=>0xfefceffffe00: .. .. [..] .. .. .. .. .. .. .. .. .. .. .. .. ..
0xfefceffffe10: .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
See https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html#short-granules for a description of short granule tags
Shadow memory (and short granules) are not prepended with memory
address and arrow at the end of line is removed.
https://reviews.llvm.org/D70707
Files:
compiler-rt/lib/hwasan/hwasan_report.cpp
Index: compiler-rt/lib/hwasan/hwasan_report.cpp
===================================================================
--- compiler-rt/lib/hwasan/hwasan_report.cpp
+++ compiler-rt/lib/hwasan/hwasan_report.cpp
@@ -371,12 +371,13 @@
InternalScopedString s(GetPageSizeCached() * 8);
for (tag_t *row = beg_row; row < end_row; row += row_len) {
s.append("%s", row == center_row_beg ? "=>" : " ");
+ s.append("%p:", row);
for (uptr i = 0; i < row_len; i++) {
s.append("%s", row + i == tag_ptr ? "[" : " ");
print_tag(s, &row[i]);
s.append("%s", row + i == tag_ptr ? "]" : " ");
}
- s.append("%s\n", row == center_row_beg ? "<=" : " ");
+ s.append("\n");
}
Printf("%s", s.data());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70707.231020.patch
Type: text/x-patch
Size: 733 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191126/0a8733f8/attachment.bin>
More information about the llvm-commits
mailing list