Skip to content

Commit

Permalink
Add parsing for sanitizer heap_profile traces.
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwartzentruber committed Sep 29, 2022
1 parent c7eeb0e commit babd664
Show file tree
Hide file tree
Showing 6 changed files with 253 additions and 6 deletions.
4 changes: 4 additions & 0 deletions FTB/AssertionHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ def getAssertion(output):
elif line.startswith("[Non-crash bug] "):
# Magic string "added" to stderr by some fuzzers.
lastLine = line
elif "Sanitizer: soft rss limit exhausted" in line:
line = re.sub(r" \(\d+Mb vs \d+Mb\)", "", line)
line = re.sub(r"=+\d+=+", "", line)
lastLine = line

return lastLine

Expand Down
5 changes: 3 additions & 2 deletions FTB/Signatures/CrashInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ def __init__(self, stdout, stderr, configuration, crashData=None):
asanOutput = crashData if crashData else stderr

asanCrashAddressPattern = r"""(?x)
\s[A-Za-z]+Sanitizer.*\s
[A-Za-z]+Sanitizer.*\s
(?:on\saddress # Most common format, used for all overflows
|on\sunknown\saddress # Used in case of a SIGSEGV
|double-free\son # Used in case of a double-free
Expand All @@ -664,7 +664,8 @@ def __init__(self, stdout, stderr, configuration, crashData=None):
|not\sowned: # Used when calling __asan_get_allocated_size()
# on a pointer that isn't owned
|\w+-param-overlap: # Bad memcpy/strcpy/strcat... etc
|requested\sallocation\ssize\s0x[0-9a-f]+\s)
|requested\sallocation\ssize\s0x[0-9a-f]+\s
|soft\srss\slimit\sexhausted)
(\s*0x([0-9a-f]+))?"""
asanRegisterPattern = (
r"(?:\s+|\()pc\s+0x([0-9a-f]+)\s+(sp|bp)\s+0x([0-9a-f]+)\s+(sp|bp)\s+"
Expand Down
Loading

0 comments on commit babd664

Please sign in to comment.