Call post_exec_all() in calibrate.rs (#603)

* fix

* fix

* fix

* post_exec

* fix
This commit is contained in:
Dongjia Zhang 2022-05-12 18:14:21 +09:00 committed by GitHub
parent 9e382c4177
commit 62484b12f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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::<O>(&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::<O>(&self.map_observer_name)