diff options
| author | John Turner <jturner.usa@gmail.com> | 2025-12-14 02:53:49 +0000 |
|---|---|---|
| committer | John Turner <jturner.usa@gmail.com> | 2025-12-14 02:53:49 +0000 |
| commit | 87e9d1920c31eba954ba755c940687a0fe7f1bfe (patch) | |
| tree | 5ef57dc84a430053420dea7c505fb0fc4a589538 /fuzz/atom/parser/fuzz.rs | |
| parent | 90d67e30048d360dba3b282a1968091f40889d21 (diff) | |
| download | gentoo-utils-87e9d1920c31eba954ba755c940687a0fe7f1bfe.tar.gz | |
allow fuzzer disagreements where there are duplicated usedeps in the atom
Portage rejects atoms with duplicated usedeps that are otherwise
valid, gentoo-utils accepts these as valid however. So we will not
panic on cases of disagreement where the control side fails and we
detect duplicated usedeps.
Diffstat (limited to 'fuzz/atom/parser/fuzz.rs')
| -rw-r--r-- | fuzz/atom/parser/fuzz.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fuzz/atom/parser/fuzz.rs b/fuzz/atom/parser/fuzz.rs index 2acc1e9..83d5787 100644 --- a/fuzz/atom/parser/fuzz.rs +++ b/fuzz/atom/parser/fuzz.rs @@ -56,6 +56,16 @@ pub unsafe extern "C" fn LLVMFuzzerTestOneInput(input: *const u8, len: usize) -> (Ok(_), Err(rest)) => { panic!("disagreement on {str}\ncontrol:Ok\ngentoo-utils:Err({rest})"); } + (Err(_), Ok(atom)) + if atom + .usedeps() + .iter() + .any(|usedep| atom.usedeps().iter().filter(|u| usedep == *u).count() > 1) => + { + eprintln!( + "disagreement, but we will allow it since its probably because of duplicated usdeps" + ); + } (Err(_), Ok(_)) => { panic!("disagreement on {str}\ncontrol:Err\ngentoo-utils:Ok") } |
