Trait libafl::stages::mutational::MutationalStage[][src]

pub trait MutationalStage<C, CS, E, EM, I, M, OT, S>: Stage<CS, E, EM, I, S> where
    M: Mutator<I, S>,
    I: Input,
    S: HasCorpus<C, I> + Evaluator<I>,
    C: Corpus<I>,
    EM: EventManager<I, S>,
    E: Executor<I> + HasObservers<OT> + HasExecHooks<EM, I, S> + HasObserversHooks<EM, I, OT, S>,
    OT: ObserversTuple + HasExecHooksTuple<EM, I, S>,
    CS: CorpusScheduler<I, S>, 
{ fn mutator(&self) -> &M;
fn mutator_mut(&mut self) -> &mut M;
fn iterations(&self, state: &mut S) -> usize; fn perform_mutational(
        &mut self,
        state: &mut S,
        executor: &mut E,
        manager: &mut EM,
        scheduler: &CS,
        corpus_idx: usize
    ) -> Result<(), Error> { ... } }

A Mutational stage is the stage in a fuzzing run that mutates inputs. Mutational stages will usually have a range of mutations that are being applied to the input one by one, between executions.

Required methods

fn mutator(&self) -> &M[src]

The mutator registered for this stage

fn mutator_mut(&mut self) -> &mut M[src]

The mutator registered for this stage (mutable)

fn iterations(&self, state: &mut S) -> usize[src]

Gets the number of iterations this mutator should run for.

Loading content...

Provided methods

fn perform_mutational(
    &mut self,
    state: &mut S,
    executor: &mut E,
    manager: &mut EM,
    scheduler: &CS,
    corpus_idx: usize
) -> Result<(), Error>
[src]

Runs this (mutational) stage for the given testcase

Loading content...

Implementors

impl<C, CS, E, EM, I, M, OT, R, S> MutationalStage<C, CS, E, EM, I, M, OT, S> for StdMutationalStage<C, CS, E, EM, I, M, OT, R, S> where
    M: Mutator<I, S>,
    I: Input,
    S: HasCorpus<C, I> + Evaluator<I> + HasRand<R>,
    C: Corpus<I>,
    EM: EventManager<I, S>,
    E: Executor<I> + HasObservers<OT> + HasExecHooks<EM, I, S> + HasObserversHooks<EM, I, OT, S>,
    OT: ObserversTuple + HasExecHooksTuple<EM, I, S>,
    CS: CorpusScheduler<I, S>,
    R: Rand
[src]

fn mutator(&self) -> &M[src]

The mutator, added to this stage

fn mutator_mut(&mut self) -> &mut M[src]

The list of mutators, added to this stage (as mutable ref)

fn iterations(&self, state: &mut S) -> usize[src]

Gets the number of iterations as a random number

Loading content...