Struct libafl::executors::inprocess::InProcessExecutor [−][src]
pub struct InProcessExecutor<'a, EM, H, I, OT, S> where
H: FnMut(&[u8]) -> ExitKind,
I: Input + HasTargetBytes,
OT: ObserversTuple, { /* fields omitted */ }
The inmem executor simply calls a target function, then returns afterwards.
Implementations
impl<'a, EM, H, I, OT, S> InProcessExecutor<'a, EM, H, I, OT, S> where
H: FnMut(&[u8]) -> ExitKind,
I: Input + HasTargetBytes,
OT: ObserversTuple,
[src]
impl<'a, EM, H, I, OT, S> InProcessExecutor<'a, EM, H, I, OT, S> where
H: FnMut(&[u8]) -> ExitKind,
I: Input + HasTargetBytes,
OT: ObserversTuple,
[src]pub fn new<OC, OF>(
harness_fn: &'a mut H,
observers: OT,
_state: &mut S,
_event_mgr: &mut EM
) -> Result<Self, Error> where
EM: EventManager<I, S>,
OC: Corpus<I>,
OF: Feedback<I>,
S: HasObjective<OF, I> + HasSolutions<OC, I>,
[src]
pub fn new<OC, OF>(
harness_fn: &'a mut H,
observers: OT,
_state: &mut S,
_event_mgr: &mut EM
) -> Result<Self, Error> where
EM: EventManager<I, S>,
OC: Corpus<I>,
OF: Feedback<I>,
S: HasObjective<OF, I> + HasSolutions<OC, I>,
[src]Create a new in mem executor. Caution: crash and restart in one of them will lead to odd behavior if multiple are used, depending on different corpus or state.
harness_fn
- the harness, executiong the functionobservers
- the observers observing the target during execution This may return an error on unix, if signal handler setup fails
pub fn harness_mut(&mut self) -> &mut H
[src]
pub fn harness_mut(&mut self) -> &mut H
[src]Retrieve the harness function for a mutable reference.
Trait Implementations
impl<'a, EM, H, I, OT, S> Executor<I> for InProcessExecutor<'a, EM, H, I, OT, S> where
H: FnMut(&[u8]) -> ExitKind,
I: Input + HasTargetBytes,
OT: ObserversTuple,
[src]
impl<'a, EM, H, I, OT, S> Executor<I> for InProcessExecutor<'a, EM, H, I, OT, S> where
H: FnMut(&[u8]) -> ExitKind,
I: Input + HasTargetBytes,
OT: ObserversTuple,
[src]impl<'a, EM, H, I, OT, S> HasExecHooks<EM, I, S> for InProcessExecutor<'a, EM, H, I, OT, S> where
H: FnMut(&[u8]) -> ExitKind,
I: Input + HasTargetBytes,
OT: ObserversTuple,
[src]
impl<'a, EM, H, I, OT, S> HasExecHooks<EM, I, S> for InProcessExecutor<'a, EM, H, I, OT, S> where
H: FnMut(&[u8]) -> ExitKind,
I: Input + HasTargetBytes,
OT: ObserversTuple,
[src]impl<'a, EM, H, I, OT, S> HasObservers<OT> for InProcessExecutor<'a, EM, H, I, OT, S> where
H: FnMut(&[u8]) -> ExitKind,
I: Input + HasTargetBytes,
OT: ObserversTuple,
[src]
impl<'a, EM, H, I, OT, S> HasObservers<OT> for InProcessExecutor<'a, EM, H, I, OT, S> where
H: FnMut(&[u8]) -> ExitKind,
I: Input + HasTargetBytes,
OT: ObserversTuple,
[src]impl<'a, EM, H, I, OT, S> HasObserversHooks<EM, I, OT, S> for InProcessExecutor<'a, EM, H, I, OT, S> where
H: FnMut(&[u8]) -> ExitKind,
I: Input + HasTargetBytes,
OT: ObserversTuple + HasExecHooksTuple<EM, I, S>,
[src]
impl<'a, EM, H, I, OT, S> HasObserversHooks<EM, I, OT, S> for InProcessExecutor<'a, EM, H, I, OT, S> where
H: FnMut(&[u8]) -> ExitKind,
I: Input + HasTargetBytes,
OT: ObserversTuple + HasExecHooksTuple<EM, I, S>,
[src]fn pre_exec_observers(
&mut self,
state: &mut S,
mgr: &mut EM,
input: &I
) -> Result<(), Error>
[src]
fn pre_exec_observers(
&mut self,
state: &mut S,
mgr: &mut EM,
input: &I
) -> Result<(), Error>
[src]Run the pre exec hook for all crate::observers::Observer
s
linked to this Executor
.
fn post_exec_observers(
&mut self,
state: &mut S,
mgr: &mut EM,
input: &I
) -> Result<(), Error>
[src]
fn post_exec_observers(
&mut self,
state: &mut S,
mgr: &mut EM,
input: &I
) -> Result<(), Error>
[src]Run the post exec hook for all the crate::observers::Observer
s
linked to this Executor
.
Auto Trait Implementations
impl<'a, EM, H, I, OT, S> RefUnwindSafe for InProcessExecutor<'a, EM, H, I, OT, S> where
EM: RefUnwindSafe,
H: RefUnwindSafe,
I: RefUnwindSafe,
OT: RefUnwindSafe,
S: RefUnwindSafe,
EM: RefUnwindSafe,
H: RefUnwindSafe,
I: RefUnwindSafe,
OT: RefUnwindSafe,
S: RefUnwindSafe,
impl<'a, EM, H, I, OT, S> Send for InProcessExecutor<'a, EM, H, I, OT, S> where
EM: Send,
H: Send,
I: Send,
OT: Send,
S: Send,
EM: Send,
H: Send,
I: Send,
OT: Send,
S: Send,
impl<'a, EM, H, I, OT, S> Sync for InProcessExecutor<'a, EM, H, I, OT, S> where
EM: Sync,
H: Sync,
I: Sync,
OT: Sync,
S: Sync,
EM: Sync,
H: Sync,
I: Sync,
OT: Sync,
S: Sync,
impl<'a, EM, H, I, OT, S> Unpin for InProcessExecutor<'a, EM, H, I, OT, S> where
EM: Unpin,
I: Unpin,
OT: Unpin,
S: Unpin,
EM: Unpin,
I: Unpin,
OT: Unpin,
S: Unpin,
impl<'a, EM, H, I, OT, S> !UnwindSafe for InProcessExecutor<'a, EM, H, I, OT, S>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self