diff --git a/fuzzers/binary_only/qemu_launcher/src/client.rs b/fuzzers/binary_only/qemu_launcher/src/client.rs index 3ab3fdfb97..0d5cc9b75b 100644 --- a/fuzzers/binary_only/qemu_launcher/src/client.rs +++ b/fuzzers/binary_only/qemu_launcher/src/client.rs @@ -9,10 +9,9 @@ use libafl::{ Error, }; use libafl_bolts::{rands::StdRand, tuples::tuple_list}; -#[cfg(feature = "injections")] -use libafl_qemu::modules::injections::InjectionModule; use libafl_qemu::modules::{ asan::AsanModule, asan_guest::AsanGuestModule, cmplog::CmpLogModule, DrCovModule, + InjectionModule, }; use crate::{ @@ -75,7 +74,7 @@ impl Client<'_> { } #[cfg(not(feature = "injections"))] - let injection_module = None; + let injection_module = Option::::None; #[cfg(feature = "injections")] let injection_module = self @@ -95,10 +94,14 @@ impl Client<'_> { let is_cmplog = self.options.is_cmplog_core(core_id); - let extra_tokens = injection_module - .as_ref() - .map(|h| h.tokens.clone()) - .unwrap_or_default(); + let extra_tokens = if cfg!(feature = "injections") { + injection_module + .as_ref() + .map(|h| h.tokens.clone()) + .unwrap_or_default() + } else { + Vec::new() + }; let instance_builder = Instance::builder() .options(self.options) diff --git a/fuzzers/binary_only/qemu_launcher/src/fuzzer.rs b/fuzzers/binary_only/qemu_launcher/src/fuzzer.rs index 5c737f0c6a..eaebec46d5 100644 --- a/fuzzers/binary_only/qemu_launcher/src/fuzzer.rs +++ b/fuzzers/binary_only/qemu_launcher/src/fuzzer.rs @@ -129,7 +129,11 @@ impl Fuzzer { } #[cfg(feature = "simplemgr")] - return client.run(None, SimpleEventManager::new(monitor), CoreId(0)); + return client.run( + None, + SimpleEventManager::new(monitor), + ClientDescription::new(0, 0, CoreId(0)), + ); // Build and run the Launcher / fuzzer. #[cfg(not(feature = "simplemgr"))] diff --git a/fuzzers/binary_only/qemu_launcher/src/instance.rs b/fuzzers/binary_only/qemu_launcher/src/instance.rs index 3401e04e36..4f232a4b10 100644 --- a/fuzzers/binary_only/qemu_launcher/src/instance.rs +++ b/fuzzers/binary_only/qemu_launcher/src/instance.rs @@ -55,7 +55,7 @@ pub type ClientState = StdState, StdRand, OnDiskCorpus>; #[cfg(feature = "simplemgr")] -pub type ClientMgr = SimpleEventManager; +pub type ClientMgr = SimpleEventManager; #[cfg(not(feature = "simplemgr"))] pub type ClientMgr = MonitorTypedEventManager, M>; @@ -240,12 +240,7 @@ impl Instance<'_, M> { )?; executor - .run_target( - &mut NopFuzzer::new(), - &mut state, - &mut NopEventManager::new(), - &input, - ) + .run_target(&mut fuzzer, &mut state, &mut self.mgr, &input) .expect("Error running target"); // We're done :) process::exit(0);