Skip to content

Commit

Permalink
fuzz: drop size limit again
Browse files Browse the repository at this point in the history
The fuzzer keeps finding regexes that just fit into the limit, have a
Unicode word boundary assertion and gives a decent sized haystack. This
in turn results in slowish searches. The searches are horrificly slow,
but they become much slower with the sanitizers enabled it looks like.

So... drop the size limit down even more.
  • Loading branch information
BurntSushi committed May 21, 2023
1 parent a3978b2 commit 65ec58c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_regex_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fuzz_target!(|data: &[u8]| {
if let Some((char_index, _)) = char_index {
let (pattern, input) = data.split_at(char_index);
let result =
regex::RegexBuilder::new(pattern).size_limit(1 << 20).build();
regex::RegexBuilder::new(pattern).size_limit(1 << 18).build();
if let Ok(re) = result {
re.is_match(input);
}
Expand Down

0 comments on commit 65ec58c

Please sign in to comment.