From 65ec58cbd4dd9a0fcfa0823876b7dd0bb1736bd1 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sun, 21 May 2023 18:20:12 -0400 Subject: [PATCH] fuzz: drop size limit again 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. --- fuzz/fuzz_targets/fuzz_regex_match.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzz/fuzz_targets/fuzz_regex_match.rs b/fuzz/fuzz_targets/fuzz_regex_match.rs index 2f6195334..285ae352d 100644 --- a/fuzz/fuzz_targets/fuzz_regex_match.rs +++ b/fuzz/fuzz_targets/fuzz_regex_match.rs @@ -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); }