pub struct GenericInProcessExecutor<H, HB, I, OT, S> where
H: FnMut(&I) -> ExitKind + ?Sized,
HB: BorrowMut<H>,
I: Input,
OT: ObserversTuple<I, S>, { /* private fields */ }
Expand description
The inmem executor simply calls a target function, then returns afterwards.
Implementations
sourceimpl<H, HB, I, OT, S> GenericInProcessExecutor<H, HB, I, OT, S> where
H: FnMut(&I) -> ExitKind + ?Sized,
HB: BorrowMut<H>,
I: Input,
OT: ObserversTuple<I, S>,
impl<H, HB, I, OT, S> GenericInProcessExecutor<H, HB, I, OT, S> where
H: FnMut(&I) -> ExitKind + ?Sized,
HB: BorrowMut<H>,
I: Input,
OT: ObserversTuple<I, S>,
sourcepub fn new<EM, OF, Z>(
harness_fn: HB,
observers: OT,
_fuzzer: &mut Z,
_state: &mut S,
_event_mgr: &mut EM
) -> Result<Self, Error> where
EM: EventFirer<I> + EventRestarter<S>,
OF: Feedback<I, S>,
S: HasSolutions<I> + HasClientPerfMonitor,
Z: HasObjective<I, OF, S>,
pub fn new<EM, OF, Z>(
harness_fn: HB,
observers: OT,
_fuzzer: &mut Z,
_state: &mut S,
_event_mgr: &mut EM
) -> Result<Self, Error> where
EM: EventFirer<I> + EventRestarter<S>,
OF: Feedback<I, S>,
S: HasSolutions<I> + HasClientPerfMonitor,
Z: HasObjective<I, OF, S>,
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, executing the functionobservers
- the observers observing the target during execution This may return an error on unix, if signal handler setup fails
sourcepub fn harness_mut(&mut self) -> &mut H
pub fn harness_mut(&mut self) -> &mut H
Retrieve the harness function for a mutable reference.
sourcepub fn handlers(&self) -> &InProcessHandlers
pub fn handlers(&self) -> &InProcessHandlers
The inprocess handlers
sourcepub fn handlers_mut(&mut self) -> &mut InProcessHandlers
pub fn handlers_mut(&mut self) -> &mut InProcessHandlers
The inprocess handlers (mutable)
Trait Implementations
sourceimpl<H, HB, I, OT, S> Debug for GenericInProcessExecutor<H, HB, I, OT, S> where
H: FnMut(&I) -> ExitKind + ?Sized,
HB: BorrowMut<H>,
I: Input,
OT: ObserversTuple<I, S>,
impl<H, HB, I, OT, S> Debug for GenericInProcessExecutor<H, HB, I, OT, S> where
H: FnMut(&I) -> ExitKind + ?Sized,
HB: BorrowMut<H>,
I: Input,
OT: ObserversTuple<I, S>,
sourceimpl<EM, H, HB, I, OT, S, Z> Executor<EM, I, S, Z> for GenericInProcessExecutor<H, HB, I, OT, S> where
H: FnMut(&I) -> ExitKind + ?Sized,
HB: BorrowMut<H>,
I: Input,
OT: ObserversTuple<I, S>,
impl<EM, H, HB, I, OT, S, Z> Executor<EM, I, S, Z> for GenericInProcessExecutor<H, HB, I, OT, S> where
H: FnMut(&I) -> ExitKind + ?Sized,
HB: BorrowMut<H>,
I: Input,
OT: ObserversTuple<I, S>,
sourcefn run_target(
&mut self,
fuzzer: &mut Z,
state: &mut S,
mgr: &mut EM,
input: &I
) -> Result<ExitKind, Error>
fn run_target(
&mut self,
fuzzer: &mut Z,
state: &mut S,
mgr: &mut EM,
input: &I
) -> Result<ExitKind, Error>
Instruct the target about the input and run
sourcefn with_observers<OT>(self, observers: OT) -> WithObservers<Self, OT> where
Self: Sized,
OT: ObserversTuple<I, S>,
fn with_observers<OT>(self, observers: OT) -> WithObservers<Self, OT> where
Self: Sized,
OT: ObserversTuple<I, S>,
Wraps this Executor with the given ObserversTuple
to implement HasObservers
. Read more
sourcefn post_run_reset(&mut self)
fn post_run_reset(&mut self)
Custom Reset Handler, e.g., to reset timers
sourceimpl<H, HB, I, OT, S> HasObservers<I, OT, S> for GenericInProcessExecutor<H, HB, I, OT, S> where
H: FnMut(&I) -> ExitKind + ?Sized,
HB: BorrowMut<H>,
I: Input,
OT: ObserversTuple<I, S>,
impl<H, HB, I, OT, S> HasObservers<I, OT, S> for GenericInProcessExecutor<H, HB, I, OT, S> where
H: FnMut(&I) -> ExitKind + ?Sized,
HB: BorrowMut<H>,
I: Input,
OT: ObserversTuple<I, S>,
Auto Trait Implementations
impl<H: ?Sized, HB, I, OT, S> RefUnwindSafe for GenericInProcessExecutor<H, HB, I, OT, S> where
H: RefUnwindSafe,
HB: RefUnwindSafe,
I: RefUnwindSafe,
OT: RefUnwindSafe,
S: RefUnwindSafe,
impl<H, HB, I, OT, S> !Send for GenericInProcessExecutor<H, HB, I, OT, S>
impl<H, HB, I, OT, S> !Sync for GenericInProcessExecutor<H, HB, I, OT, S>
impl<H: ?Sized, HB, I, OT, S> Unpin for GenericInProcessExecutor<H, HB, I, OT, S> where
HB: Unpin,
I: Unpin,
OT: Unpin,
S: Unpin,
impl<H: ?Sized, HB, I, OT, S> UnwindSafe for GenericInProcessExecutor<H, HB, I, OT, S> where
H: RefUnwindSafe,
HB: UnwindSafe,
I: UnwindSafe,
OT: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
type PreprendResult = Tail
type PreprendResult = Tail
The Resulting TupleList
, of an Prepend::prepend()
call,
including the prepended entry. Read more
sourcefn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.