[compiler-rt] [HWASan] symbolize stack overflows (PR #95308)
Evgenii Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 14:28:42 PDT 2024
================
@@ -311,6 +315,34 @@ class Symbolizer:
if match:
self.__last_access_tag = int(match.group(2), 16)
+ def process_tag_dump_line(self, line, ignore_tags=False):
+ m = re.match(r'.*?(0x[0-9a-f]+):' + '([ ]*[\[ ][0-9a-f][0-9a-f]\]?)' * 16, line)
+ if m is None:
+ return False
+ addr = m.group(1)
+ tags = m.group(*range(2, 18))
+ fault = [i for i, x in enumerate(tags) if '[' in x]
+ if fault:
+ self.__tag_dump_match_idx = len(self.__tag_dump) + fault[0]
+ self.__tag_dump.extend(int(x.strip(' [').rstrip('] '), 16) for x in tags)
+ return True
+
+ def finish_tag_dump(self):
+ if self.__matched_stack_uas or self.__tag_dump_match_idx is None:
----------------
eugenis wrote:
Note that for heap the logic is different: we prefer short oob over uaf over long oob.
Hard to say which is better for stack.
https://github.com/llvm/llvm-project/pull/95308
More information about the llvm-commits
mailing list