From 461731cc5adfe21b0568d868bfbc63c86244c9d1 Mon Sep 17 00:00:00 2001 From: Alwin Berger Date: Tue, 27 Aug 2024 13:15:38 +0200 Subject: [PATCH] fix: fallback to 0 response-time if target job did not finish --- fuzzers/FRET/src/systemstate/observers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzzers/FRET/src/systemstate/observers.rs b/fuzzers/FRET/src/systemstate/observers.rs index 6de308abec..4f669b39ff 100644 --- a/fuzzers/FRET/src/systemstate/observers.rs +++ b/fuzzers/FRET/src/systemstate/observers.rs @@ -141,7 +141,7 @@ where I: Default { Self{last_run: vec![], last_trace: vec![], last_reads: vec![], last_input: I::default(), worst_job_instances: HashMap::new(), select_task: select_task.clone(), name: Cow::from("systemstate".to_string()), last_states: HashMap::new(), success: false, job_instances: vec![]} } pub fn last_runtime(&self) -> u64 { - self.select_task.as_ref().map(|x| self.worst_job_instances.get(x).unwrap_or(&unsafe{libafl_qemu::sys::icount_get_raw()}).clone()).unwrap_or(unsafe{libafl_qemu::sys::icount_get_raw()}) + self.select_task.as_ref().map(|x| self.worst_job_instances.get(x).unwrap_or(&0).clone()).unwrap_or(unsafe{libafl_qemu::sys::icount_get_raw()}) } } impl Default for QemuSystemStateObserver