diff options
| author | John Turner <jturner.usa@gmail.com> | 2025-11-22 05:49:45 +0000 |
|---|---|---|
| committer | John Turner <jturner.usa@gmail.com> | 2025-11-22 05:49:45 +0000 |
| commit | de9fd0fbd99259259dfd01d14c95cea2d6b00e34 (patch) | |
| tree | b7a5f4a299e7637eda6e9373023e95e5f562c38c | |
| parent | 906288169218638df3053130b5d92040fc3d4f40 (diff) | |
| download | gentoo-utils-de9fd0fbd99259259dfd01d14c95cea2d6b00e34.tar.gz | |
print the remaining input on fuzzer failures
| -rw-r--r-- | fuzz/atom/parser/fuzz.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fuzz/atom/parser/fuzz.rs b/fuzz/atom/parser/fuzz.rs index 610e08b..9af41f2 100644 --- a/fuzz/atom/parser/fuzz.rs +++ b/fuzz/atom/parser/fuzz.rs @@ -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| { |
