pub struct ShadowExecutor<E, SOT> { /* private fields */ }
Expand description

A ShadowExecutor wraps an executor and a set of shadow observers

Implementations§

source§

impl<E, SOT> ShadowExecutor<E, SOT>where
    E: HasObservers + Debug,
    SOT: ObserversTuple<E::State> + Debug,

source

pub fn new(executor: E, shadow_observers: SOT) -> Self

Create a new ShadowExecutor, wrapping the given executor.

source

pub fn shadow_observers(&self) -> &SOT

The shadow observers are not considered by the feedbacks and the manager, mutable

source

pub fn shadow_observers_mut(&mut self) -> &mut SOT

The shadow observers are not considered by the feedbacks and the manager, mutable

Trait Implementations§

source§

impl<E, SOT> Debug for ShadowExecutor<E, SOT>where
    E: UsesState + Debug,
    SOT: ObserversTuple<E::State> + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<E, EM, SOT, Z> Executor<EM, Z> for ShadowExecutor<E, SOT>where
    E: Executor<EM, Z> + HasObservers,
    SOT: ObserversTuple<E::State>,
    EM: UsesState<State = E::State>,
    Z: UsesState<State = E::State>,

source§

fn run_target(
    &mut self,
    fuzzer: &mut Z,
    state: &mut Self::State,
    mgr: &mut EM,
    input: &Self::Input
) -> Result<ExitKind, Error>

Instruct the target about the input and run
source§

fn with_observers<OT>(self, observers: OT) -> WithObservers<Self, OT>where
    Self: Sized,
    OT: ObserversTuple<Self::State>,

Wraps this Executor with the given ObserversTuple to implement HasObservers. Read more
source§

fn post_run_reset(&mut self)

Custom Reset Handler, e.g., to reset timers
source§

impl<E, SOT> HasObservers for ShadowExecutor<E, SOT>where
    E: HasObservers,
    SOT: ObserversTuple<E::State>,

source§

fn observers(&self) -> &Self::Observers

Get the linked observers
source§

fn observers_mut(&mut self) -> &mut Self::Observers

Get the linked observers (mutable)
source§

impl<E, EM, SOT, Z> Stage<ShadowExecutor<E, SOT>, EM, Z> for ShadowTracingStage<E, EM, SOT, Z>where
    E: Executor<EM, Z> + HasObservers,
    EM: UsesState<State = E::State>,
    SOT: ObserversTuple<E::State>,
    Z: UsesState<State = E::State>,
    E::State: State + HasClientPerfMonitor + HasExecutions + HasCorpus + Debug,

source§

fn perform(
    &mut self,
    fuzzer: &mut Z,
    executor: &mut ShadowExecutor<E, SOT>,
    state: &mut E::State,
    manager: &mut EM,
    corpus_idx: CorpusId
) -> Result<(), Error>

Run the stage
source§

impl<E, SOT> UsesObservers for ShadowExecutor<E, SOT>where
    E: UsesObservers,

§

type Observers = <E as UsesObservers>::Observers

The observers type
source§

impl<E, SOT> UsesState for ShadowExecutor<E, SOT>where
    E: UsesState,

§

type State = <E as UsesState>::State

The state known by this type.

Auto Trait Implementations§

§

impl<E, SOT> RefUnwindSafe for ShadowExecutor<E, SOT>where
    E: RefUnwindSafe,
    SOT: RefUnwindSafe,

§

impl<E, SOT> Send for ShadowExecutor<E, SOT>where
    E: Send,
    SOT: Send,

§

impl<E, SOT> Sync for ShadowExecutor<E, SOT>where
    E: Sync,
    SOT: Sync,

§

impl<E, SOT> Unpin for ShadowExecutor<E, SOT>where
    E: Unpin,
    SOT: Unpin,

§

impl<E, SOT> UnwindSafe for ShadowExecutor<E, SOT>where
    E: UnwindSafe,
    SOT: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Tail, T> Prepend<T> for Tail

§

type PreprendResult = Tail

The Resulting TupleList, of an Prepend::prepend() call, including the prepended entry.
source§

fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)

Prepend a value to this tuple, returning a new tuple with prepended value.
source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<KS> UsesInput for KSwhere
    KS: UsesState,

§

type Input = <<KS as UsesState>::State as UsesInput>::Input

Type which will be used throughout this state.