From 09950ccc345f5e9e4bb17939a0912fddce395155 Mon Sep 17 00:00:00 2001 From: "Celian G." Date: Thu, 19 Dec 2024 14:51:59 +0100 Subject: [PATCH] Update last found time when evaluating an input (#2782) Co-authored-by: celian Co-authored-by: Dongjia "toka" Zhang --- libafl/src/fuzzer/mod.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libafl/src/fuzzer/mod.rs b/libafl/src/fuzzer/mod.rs index 4ac5aeedb6..44804c7178 100644 --- a/libafl/src/fuzzer/mod.rs +++ b/libafl/src/fuzzer/mod.rs @@ -298,7 +298,8 @@ where + MaybeHasClientPerfMonitor + UsesInput::Input> + HasCurrentTestcase - + HasSolutions, + + HasSolutions + + HasLastFoundTime, F: Feedback::Input, OT, S>, OF: Feedback::Input, OT, S>, OT: ObserversTuple<::Input, S> + Serialize, @@ -359,6 +360,9 @@ where if send_events { self.serialize_and_dispatch(state, manager, input, &exec_res, observers, exit_kind)?; } + if exec_res != ExecuteInputResult::None { + *state.last_found_time_mut() = current_time(); + } Ok((exec_res, corpus_id)) } @@ -505,7 +509,8 @@ where + MaybeHasClientPerfMonitor + HasCurrentTestcase + UsesInput::Input> - + HasExecutions, + + HasExecutions + + HasLastFoundTime, ::Input: Input, S::Solutions: Corpus::Input>, {