Trait libafl::fuzzer::Evaluator

source ·
pub trait Evaluator<E, EM>: UsesStatewhere
    E: UsesState<State = Self::State>,
    EM: UsesState<State = Self::State>,
{ fn evaluate_input_events(
        &mut self,
        state: &mut Self::State,
        executor: &mut E,
        manager: &mut EM,
        input: <Self::State as UsesInput>::Input,
        send_events: bool
    ) -> Result<(ExecuteInputResult, Option<CorpusId>), Error>; fn add_input(
        &mut self,
        state: &mut Self::State,
        executor: &mut E,
        manager: &mut EM,
        input: <Self::State as UsesInput>::Input
    ) -> Result<CorpusId, Error>; fn evaluate_input(
        &mut self,
        state: &mut Self::State,
        executor: &mut E,
        manager: &mut EM,
        input: <Self::State as UsesInput>::Input
    ) -> Result<(ExecuteInputResult, Option<CorpusId>), Error> { ... } }
Expand description

Evaluate an input modifying the state of the fuzzer

Required Methods§

source

fn evaluate_input_events(
    &mut self,
    state: &mut Self::State,
    executor: &mut E,
    manager: &mut EM,
    input: <Self::State as UsesInput>::Input,
    send_events: bool
) -> Result<(ExecuteInputResult, Option<CorpusId>), Error>

Runs the input and triggers observers and feedback, returns if is interesting an (option) the index of the new testcase in the corpus This version has a boolean to decide if send events to the manager.

source

fn add_input(
    &mut self,
    state: &mut Self::State,
    executor: &mut E,
    manager: &mut EM,
    input: <Self::State as UsesInput>::Input
) -> Result<CorpusId, Error>

Runs the input and triggers observers and feedback. Adds an input, to the corpus even if it’s not considered interesting by the feedback. Returns the index of the new testcase in the corpus. Usually, you want to use Evaluator::evaluate_input, unless you know what you are doing.

Provided Methods§

source

fn evaluate_input(
    &mut self,
    state: &mut Self::State,
    executor: &mut E,
    manager: &mut EM,
    input: <Self::State as UsesInput>::Input
) -> Result<(ExecuteInputResult, Option<CorpusId>), Error>

Runs the input and triggers observers and feedback, returns if is interesting an (option) the index of the new crate::corpus::Testcase in the corpus

Implementors§

source§

impl<CS, E, EM, F, OF, OT> Evaluator<E, EM> for StdFuzzer<CS, F, OF, OT>where
    CS: Scheduler,
    E: HasObservers<State = CS::State, Observers = OT> + Executor<EM, Self>,
    EM: EventFirer<State = CS::State>,
    F: Feedback<CS::State>,
    OF: Feedback<CS::State>,
    OT: ObserversTuple<CS::State> + Serialize + DeserializeOwned,
    CS::State: HasCorpus + HasSolutions + HasClientPerfMonitor + HasExecutions,