Struct libafl::executors::timeout::TimeoutExecutor[][src]

pub struct TimeoutExecutor<E, I> where
    E: Executor<I>,
    I: Input
{ /* fields omitted */ }
Expand description

The timeout excutor is a wrapper that set a timeout before each run

Implementations

impl<E, I> TimeoutExecutor<E, I> where
    E: Executor<I>,
    I: Input
[src]

pub fn new(executor: E, exec_tmout: Duration) -> Self[src]

Create a new TimeoutExecutor, wrapping the given executor and checking for timeouts. This should usually be used for InProcess fuzzing.

pub fn inner(&mut self) -> &mut E[src]

Retrieve the inner Executor that is wrapped by this TimeoutExecutor.

Trait Implementations

impl<E, I> Executor<I> for TimeoutExecutor<E, I> where
    E: Executor<I>,
    I: Input
[src]

fn run_target(&mut self, input: &I) -> Result<ExitKind, Error>[src]

Instruct the target about the input and run

impl<E, EM, I, S, Z> HasExecHooks<EM, I, S, Z> for TimeoutExecutor<E, I> where
    E: Executor<I> + HasExecHooks<EM, I, S, Z>,
    I: Input
[src]

fn pre_exec(
    &mut self,
    fuzzer: &mut Z,
    state: &mut S,
    mgr: &mut EM,
    input: &I
) -> Result<(), Error>
[src]

Called right before exexution starts

fn post_exec(
    &mut self,
    fuzzer: &mut Z,
    state: &mut S,
    mgr: &mut EM,
    input: &I
) -> Result<(), Error>
[src]

Called right after execution finished.

impl<E, I, OT> HasObservers<OT> for TimeoutExecutor<E, I> where
    E: Executor<I> + HasObservers<OT>,
    I: Input,
    OT: ObserversTuple
[src]

fn observers(&self) -> &OT[src]

Get the linked observers

fn observers_mut(&mut self) -> &mut OT[src]

Get the linked observers

impl<E, EM, I, OT, S, Z> HasObserversHooks<EM, I, OT, S, Z> for TimeoutExecutor<E, I> where
    E: Executor<I> + HasObservers<OT>,
    I: Input,
    OT: ObserversTuple + HasExecHooksTuple<EM, I, S, Z>, 
[src]

fn pre_exec_observers(
    &mut self,
    fuzzer: &mut Z,
    state: &mut S,
    mgr: &mut EM,
    input: &I
) -> Result<(), Error>
[src]

Run the pre exec hook for all crate::observers::Observers linked to this Executor.

fn post_exec_observers(
    &mut self,
    fuzzer: &mut Z,
    state: &mut S,
    mgr: &mut EM,
    input: &I
) -> Result<(), Error>
[src]

Run the post exec hook for all the crate::observers::Observers linked to this Executor.

Auto Trait Implementations

impl<E, I> RefUnwindSafe for TimeoutExecutor<E, I> where
    E: RefUnwindSafe,
    I: RefUnwindSafe

impl<E, I> Send for TimeoutExecutor<E, I> where
    E: Send,
    I: Send

impl<E, I> Sync for TimeoutExecutor<E, I> where
    E: Sync,
    I: Sync

impl<E, I> Unpin for TimeoutExecutor<E, I> where
    E: Unpin,
    I: Unpin

impl<E, I> UnwindSafe for TimeoutExecutor<E, I> where
    E: UnwindSafe,
    I: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.