This is an archive of the discontinued LLVM Phabricator instance.

[hwasan] Make memory dump same as the one in asan.
ClosedPublic

Authored by marxin on Nov 26 2019, 1:27 AM.

Details

Summary

Shadow memory (and short granules) are not prepended with memory
address and arrow at the end of line is removed.

Diff Detail

Event Timeline

marxin created this revision.Nov 26 2019, 1:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 26 2019, 1:27 AM

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
pcc added a comment.Nov 26 2019, 1:39 PM

Test case? (Do none of the tests really need to be updated?)

In D70707#1760759, @pcc wrote:

Test case? (Do none of the tests really need to be updated?)

No, tests do not need to be updated. I've just installed the patch.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 27 2019, 9:50 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptNov 27 2019, 9:50 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript