Trait libafl::schedulers::Scheduler
source · pub trait Scheduler: UsesState {
fn next(&self, state: &mut Self::State) -> Result<CorpusId, Error>;
fn on_add(
&self,
_state: &mut Self::State,
_idx: CorpusId
) -> Result<(), Error> { ... }
fn on_replace(
&self,
_state: &mut Self::State,
_idx: CorpusId,
_prev: &Testcase<<Self::State as UsesInput>::Input>
) -> Result<(), Error> { ... }
fn on_remove(
&self,
_state: &mut Self::State,
_idx: CorpusId,
_testcase: &Option<Testcase<<Self::State as UsesInput>::Input>>
) -> Result<(), Error> { ... }
}
Expand description
The scheduler define how the fuzzer requests a testcase from the corpus. It has hooks to corpus add/replace/remove to allow complex scheduling algorithms to collect data.
Required Methods§
Provided Methods§
sourcefn on_add(&self, _state: &mut Self::State, _idx: CorpusId) -> Result<(), Error>
fn on_add(&self, _state: &mut Self::State, _idx: CorpusId) -> Result<(), Error>
Added an entry to the corpus at the given index