[compiler-rt] 8565e83 - [hwasan] add pattern for short tag in symbolizer

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 11:12:46 PST 2023


Author: Johan Erlandsson
Date: 2023-01-18T11:12:39-08:00
New Revision: 8565e8352be8900b20ebf1f741aeb425614f7906

URL: https://github.com/llvm/llvm-project/commit/8565e8352be8900b20ebf1f741aeb425614f7906
DIFF: https://github.com/llvm/llvm-project/commit/8565e8352be8900b20ebf1f741aeb425614f7906.diff

LOG: [hwasan] add pattern for short tag in symbolizer

Lines with 'record_addr:' are not processed when failing to decode
access tag. The regular format is: %02x/%02x but for a short tag it's:
%02x/%02x(%02x). Now it will handle both cases.

Tested-by: Ivar Henckel <ivar.henckel at sony.com>

Reviewed By: fmayer

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

Added: 
    

Modified: 
    compiler-rt/lib/hwasan/scripts/hwasan_symbolize

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/hwasan/scripts/hwasan_symbolize b/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
index 6de4fe1db0cbf..0408e0eb9993d 100755
--- a/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
+++ b/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
@@ -307,7 +307,7 @@ class Symbolizer:
     match = re.match(r'^(.*?)HWAddressSanitizer: tag-mismatch on address (0x[0-9a-f]+) ', line, re.UNICODE)
     if match:
       self.__last_access_address = int(match.group(2), 16)
-    match = re.match(r'^(.*?) of size [0-9]+ at 0x[0-9a-f]* tags: ([0-9a-f]+)/[0-9a-f]+ \(ptr/mem\)', line, re.UNICODE)
+    match = re.match(r'^(.*?) of size [0-9]+ at 0x[0-9a-f]* tags: ([0-9a-f]+)/[0-9a-f]+(\([0-9a-f]+\))? \(ptr/mem\)', line, re.UNICODE)
     if match:
       self.__last_access_tag = int(match.group(2), 16)
 


        


More information about the llvm-commits mailing list