diff --git a/afl/src/executors/inmemory.rs b/afl/src/executors/inmemory.rs index 8636598ad9..a9d6153a9e 100644 --- a/afl/src/executors/inmemory.rs +++ b/afl/src/executors/inmemory.rs @@ -1,4 +1,5 @@ use core::marker::PhantomData; +#[cfg(feature = "std")] use os_signals::set_oncrash_ptrs; use crate::{ @@ -18,6 +19,7 @@ use crate::{ #[cfg(unix)] use unix_signals as os_signals; +#[cfg(feature = "std")] use self::os_signals::reset_oncrash_ptrs; #[cfg(feature = "std")] use self::os_signals::setup_crash_handlers; @@ -48,10 +50,10 @@ where #[inline] fn pre_exec( &mut self, - state: &State, - corpus: &C, - event_mgr: &mut EM, - input: &I, + _state: &State, + _corpus: &C, + _event_mgr: &mut EM, + _input: &I, ) -> Result<(), AflError> where R: Rand, @@ -60,8 +62,9 @@ where EM: EventManager, { #[cfg(unix)] + #[cfg(feature = "std")] unsafe { - set_oncrash_ptrs::(state, corpus, event_mgr, input); + set_oncrash_ptrs::(_state, _corpus, _event_mgr, _input); } Ok(()) } @@ -81,6 +84,7 @@ where EM: EventManager, { #[cfg(unix)] + #[cfg(feature = "std")] unsafe { reset_oncrash_ptrs::(); } diff --git a/afl/src/utils.rs b/afl/src/utils.rs index 3fe482abe1..9eef956600 100644 --- a/afl/src/utils.rs +++ b/afl/src/utils.rs @@ -36,11 +36,7 @@ where SH: ShMem, ST: Stats, { - println!("state ptr: {:x}", state as *const _ as u64); - println!("state execs: {}", state.executions()); - println!("More fun"); let ret_slice = postcard::to_allocvec(&(&state, &corpus, &mgr.describe()?))?; - println!("done: {:?}", ret_slice); //let corpus_bytes = serde_json::to_string(&corpus).unwrap(); //println!("fun");