|
66 | 66 | # The 'assertion .* failed' is suffixed with the failure reason. E.g., |
67 | 67 | # 'assertion __dest < len() failed: sample_array[] index out of bounds', |
68 | 68 | # 'assertion !full() failed: sample_function() called on an empty vector' |
| 69 | +# Add the lookahead group to prevent DoS, see |
| 70 | +# https://github.com/google/clusterfuzz/issues/3978. |
69 | 71 | ASSERT_REGEX_GLIBC_SUFFIXED = re.compile( |
70 | | - r'.*\S.*\/.*:\d+:\s*assertion .* failed:\s*(\S.*)') |
| 72 | + r'(?=.*assertion .* failed:.).*.*\S.*\/.*:\d+:\s*assertion .* failed:\s*(\S.*)' # pylint: disable=line-too-long |
| 73 | +) |
71 | 74 | ASSERT_NOT_REACHED_REGEX = re.compile(r'^\s*SHOULD NEVER BE REACHED\s*$') |
72 | 75 | CENTIPEDE_TIMEOUT_REGEX = re.compile(r'(?:%s)' % '|'.join([ |
73 | 76 | r'========= Timeout of \d+ seconds exceeded; exiting', |
|
200 | 203 | r'[ ]*([^ ]*|Atomic [^ ]*) of size ([^ ]*) at ([^ ]*)') |
201 | 204 | SAN_DEADLYSIGNAL_REGEX = re.compile( |
202 | 205 | r'(Address|Leak|Memory|UndefinedBehavior|Thread)Sanitizer:DEADLYSIGNAL') |
| 206 | +# Use the lookahead group to prevent DoS, see |
| 207 | +# https://github.com/google/clusterfuzz/issues/3978. |
203 | 208 | CONCATENATED_SAN_DEADLYSIGNAL_REGEX = re.compile( |
204 | | - r'\n([^\n]*\S[^\n]*)(' + SAN_DEADLYSIGNAL_REGEX.pattern + r')\n') |
| 209 | + r'\n(?=.*Sanitizer\:DEADLYSIGNAL.*)([^\n]*\S[^\n]*)(' + |
| 210 | + SAN_DEADLYSIGNAL_REGEX.pattern + r')\n') |
205 | 211 | SPLIT_CONCATENATED_SAN_DEADLYSIGNAL_REGEX = r'\n\1\n\2\n' |
206 | 212 | SAN_FPE_REGEX = re.compile(r'.*[a-zA-Z]+Sanitizer: FPE ') |
207 | 213 | SAN_ILL_REGEX = re.compile(r'.*[a-zA-Z]+Sanitizer: ILL ') |
|
0 commit comments