You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have used afl.rs to fuzz all public API of the crate. And I found several cases may cause panic. The version I fuzz on is newest version. The code to replay these panics are as follows:
These 4 cases are about range start index out of range for slice error:
let _local0 = regex::Regex::new("\0\0\0\0$");
let _local1_param0_helper1 = _local0.unwrap();
let _local1 = regex::Regex::find_at(&(_local1_param0_helper1), "\r\0\u{1}\u{e}a", 2449958197290798336);
let _local2_param0_helper1 = _local1.unwrap();
regex::Match::end(&(_local2_param0_helper1));
let _local0 = regex::RegexBuilder::new("$");
let _local1 = regex::RegexBuilder::build(&(&_local0));
let _local2_param0_helper1 = _local1.unwrap();
regex::Regex::shortest_match_at(&(_local2_param0_helper1), "{S", 8897841259371199355);
let _local0 = regex::Regex::new("$$$$$$$$$$");
let _local1_param0_helper1 = _local0.unwrap();
let _local1 = regex::Regex::find_at(&(_local1_param0_helper1), "$$$$$$$$$$$", 2604246222170760228);
let _local2_param0_helper1 = _local1.unwrap();
regex::Match::end(&(_local2_param0_helper1));
let _local0 = regex::Regex::new("(\0\0\0\0\0\0\u{10}|\0\0\0\0\0)\0\0\0\0\0\0\0\0\0\u{10}|\0\0\0\0\0\0\0");
let _local1_param0_helper1 = _local0.unwrap();
let _local1 = regex::Regex::find_at(&(_local1_param0_helper1),
"\0\u{4}\0*****\u{17}***************\0\0\0\0\0\0\0\0\0\0", 35184372153856);
let _local2_param0_helper1 = _local1.unwrap();
regex::Match::end(&(_local2_param0_helper1));
These 3 cases are about out-of-bound error:
let _local0 = regex::Regex::new("[\\\\-^]\0\0\0\0\0\0\0\0\0\0\u{1}\0\0\0\0\u{3}\0\0\0\0\u{1e}\0\u{3}r\u{1}\0\u{f}\0\u{3}r|\u{17}\u{10}\0\0r|\0\0\0%\u{17}\u{10}\0\0r|\0\0");
let _local1_param0_helper1 = _local0.unwrap();
let _local1 = regex::Regex::find_at(&(_local1_param0_helper1),
"\0%r|\0r|\0\u{2}\0\u{3}\0\0|\u{17}\u{10}\0\0r|\0\0\u{1}\0\0\0\0\0\u{3}r|\u{17}\u{10}\0\0r\0\0\0\0\0#Y@\u{1}\u{1}\u{1}\u{1}\u{1}\u{1}\u{1}\u{1}\u{1}\u{1}\u{1}\u{1}",
15924992);
let _local2_param0_helper1 = _local1.unwrap();
regex::Match::end(&(_local2_param0_helper1));
let _local0 = regex::RegexSet::empty();
let _local1 = regex::RegexSet::matches(&(_local0), "\u{19}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t2");
regex::SetMatches::matched(&(_local1), 9153857652018186505);
let _local0 = regex::Regex::new("E\0|\u{741}");
let _local1_param0_helper1 = _local0.unwrap();
let _local1 = regex::Regex::capture_locations(&(_local1_param0_helper1));
regex::CaptureLocations::get(&(_local1) ,9238929028971069751);
I also put these replay codes and more data that may cause panic on replays.
I hope you can check if these are real bugs need to be fixed. Thanks a lot.
The text was updated successfully, but these errors were encountered:
Only your last one is an example of a real bug, and that corresponds to #950. The remaining examples are just passing out-of-bounds indices to APIs that are supposed to panic. The documentation does need to be improved to specifically call that out.
I have used afl.rs to fuzz all public API of the crate. And I found several cases may cause panic. The version I fuzz on is newest version. The code to replay these panics are as follows:
These 4 cases are about range start index out of range for slice error:
These 3 cases are about out-of-bound error:
This case is about arithmetic overflow:
I also put these replay codes and more data that may cause panic on replays.
I hope you can check if these are real bugs need to be fixed. Thanks a lot.
The text was updated successfully, but these errors were encountered: