Continue loading inputs even if some fail to deserialize (#2820)

* Continue loading inputs even if some fail to deserialize

* fmt

* fix
This commit is contained in:
Dominik Maier 2025-01-07 15:07:46 +01:00 committed by GitHub
parent 9f8f47233c
commit 719a3c0f07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -752,8 +752,14 @@ where
EM: EventFirer<State = Self>, EM: EventFirer<State = Self>,
Z: Evaluator<E, EM, I, Self>, Z: Evaluator<E, EM, I, Self>,
{ {
log::info!("Loading file {:?} ...", &path); log::info!("Loading file {path:?} ...");
let input = (config.loader)(fuzzer, self, path)?; let input = match (config.loader)(fuzzer, self, path) {
Ok(input) => input,
Err(err) => {
log::error!("Skipping input that we could not load from {path:?}: {err:?}");
return Ok(ExecuteInputResult::None);
}
};
if config.forced { if config.forced {
let _: CorpusId = fuzzer.add_input(self, executor, manager, input)?; let _: CorpusId = fuzzer.add_input(self, executor, manager, input)?;
Ok(ExecuteInputResult::Corpus) Ok(ExecuteInputResult::Corpus)