diff --git a/libafl/src/stages/calibrate.rs b/libafl/src/stages/calibrate.rs index bfa77e7ea1..6e94b67b33 100644 --- a/libafl/src/stages/calibrate.rs +++ b/libafl/src/stages/calibrate.rs @@ -74,9 +74,11 @@ where // Run once to get the initial calibration map executor.observers_mut().pre_exec_all(state, &input)?; + let mut start = current_time(); - let mut total_time = if executor.run_target(fuzzer, state, mgr, &input)? == ExitKind::Ok { + let exit_kind = executor.run_target(fuzzer, state, mgr, &input)?; + let mut total_time = if exit_kind == ExitKind::Ok { current_time() - start } else { mgr.log( @@ -88,6 +90,10 @@ where Duration::from_secs(1) }; + executor + .observers_mut() + .post_exec_all(state, &input, &exit_kind)?; + let map_first = &executor .observers() .match_name::(&self.map_observer_name) @@ -111,7 +117,8 @@ where executor.observers_mut().pre_exec_all(state, &input)?; start = current_time(); - if executor.run_target(fuzzer, state, mgr, &input)? != ExitKind::Ok { + let exit_kind = executor.run_target(fuzzer, state, mgr, &input)?; + if exit_kind != ExitKind::Ok { if !has_errors { mgr.log( state, @@ -129,6 +136,10 @@ where total_time += current_time() - start; + executor + .observers_mut() + .post_exec_all(state, &input, &exit_kind)?; + let map = &executor .observers() .match_name::(&self.map_observer_name)