diff --git a/afl/src/executors/inmemory.rs b/afl/src/executors/inmemory.rs index 539e4cdbcb..3c624a918e 100644 --- a/afl/src/executors/inmemory.rs +++ b/afl/src/executors/inmemory.rs @@ -26,6 +26,8 @@ impl Executor for InMemoryExecutor where I: Input + HasTargetBytes, { + + #[inline] fn run_target(&mut self, input: &I) -> Result { let bytes = input.target_bytes(); unsafe { @@ -38,10 +40,12 @@ where Ok(ret) } + #[inline] fn observers(&self) -> &NamedSerdeAnyMap { &self.observers } + #[inline] fn observers_mut(&mut self) -> &mut NamedSerdeAnyMap { &mut self.observers } diff --git a/afl/src/executors/mod.rs b/afl/src/executors/mod.rs index 4ce0fd0a6c..73f8c6e8fd 100644 --- a/afl/src/executors/mod.rs +++ b/afl/src/executors/mod.rs @@ -36,12 +36,14 @@ where } /// Reset the state of all the observes linked to this executor + #[inline] fn reset_observers(&mut self) -> Result<(), AflError> { self.observers_mut().for_each_mut(|_, x| Ok(x.reset()?))?; Ok(()) } /// Run the post exec hook for all the observes linked to this executor + #[inline] fn post_exec_observers(&mut self) -> Result<(), AflError> { self.observers_mut() .for_each_mut(|_, x| Ok(x.post_exec()?))?; diff --git a/afl/src/feedbacks/mod.rs b/afl/src/feedbacks/mod.rs index a148ccda16..8292bf89ec 100644 --- a/afl/src/feedbacks/mod.rs +++ b/afl/src/feedbacks/mod.rs @@ -59,6 +59,8 @@ impl Reducer for MaxReducer where T: Integer + Copy + 'static, { + + #[inline] fn reduce(first: T, second: T) -> T { if first > second { first @@ -79,6 +81,8 @@ impl Reducer for MinReducer where T: Integer + Copy + 'static, { + + #[inline] fn reduce(first: T, second: T) -> T { if first < second { first @@ -132,6 +136,7 @@ where Ok(interesting) } + #[inline] fn name(&self) -> &String { &self.name }