Merge pull request 'allow fuzzer disagreements where there are duplicated usedeps in the atom' (#10) from feature/fix-fuzzer-failure-on-duplicated-usedeps into master
Some checks failed
Gentoo Utils / build-oci-image (push) Successful in 7s
Gentoo Utils / check-format (push) Successful in 9s
Gentoo Utils / docs (push) Successful in 16s
Gentoo Utils / build (push) Successful in 27s
Gentoo Utils / test (push) Has been cancelled

Reviewed-on: #10
This commit was merged in pull request #10.
This commit is contained in:
2025-12-13 20:56:50 -06:00

View File

@@ -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")
}