print the remaining input on fuzzer failures

This commit is contained in:
John Turner
2025-11-22 05:49:45 +00:00
parent 9062881692
commit de9fd0fbd9

View File

@@ -77,8 +77,8 @@ pub unsafe extern "C" fn LLVMFuzzerTestOneInput(input: *const u8, len: usize) ->
(false, Err(_)) => {
eprintln!("agreement that {atom} is invalid");
}
(true, Err(_)) => {
panic!("rejected valid atom: {atom}");
(true, Err(ParserFinishedError::Err(it) | ParserFinishedError::Unfinished(it))) => {
panic!("rejected valid atom: {atom}: {}", it.rest());
}
(false, Ok(atom))
if atom.usedeps().iter().any(|usedep| {