pub trait PushStage<CS, EM, I, OT, S, Z>: Iterator where
CS: Scheduler<I, S>,
EM: EventFirer<I> + EventRestarter<S> + HasEventManagerId + ProgressReporter<I>,
I: Input,
OT: ObserversTuple<I, S>,
S: HasClientPerfMonitor + HasCorpus<I> + HasRand + HasExecutions,
Z: ExecutionProcessor<I, OT, S> + EvaluatorObservers<I, OT, S> + HasScheduler<CS, I, S>, {
fn push_stage_helper(&self) -> &PushStageHelper<CS, EM, I, OT, S, Z>;
fn push_stage_helper_mut(
&mut self
) -> &mut PushStageHelper<CS, EM, I, OT, S, Z>;
fn pre_exec(
&mut self,
_fuzzer: &mut Z,
_state: &mut S,
_event_mgr: &mut EM,
_observers: &mut OT
) -> Option<Result<I, Error>>;
fn set_current_corpus_idx(&mut self, corpus_idx: usize) { ... }
fn init(
&mut self,
_fuzzer: &mut Z,
_state: &mut S,
_event_mgr: &mut EM,
_observers: &mut OT
) -> Result<(), Error> { ... }
fn post_exec(
&mut self,
_fuzzer: &mut Z,
_state: &mut S,
_event_mgr: &mut EM,
_observers: &mut OT,
_input: I,
_exit_kind: ExitKind
) -> Result<(), Error> { ... }
fn deinit(
&mut self,
_fuzzer: &mut Z,
_state: &mut S,
_event_mgr: &mut EM,
_observers: &mut OT
) -> Result<(), Error> { ... }
fn next_std(&mut self) -> Option<Result<I, Error>> { ... }
}
Expand description
A push stage is a generator that returns a single testcase for each call. It’s an iterator so we can chain it. After it has finished once, we will call it agan for the next fuzzer round.
Required Methods
fn push_stage_helper(&self) -> &PushStageHelper<CS, EM, I, OT, S, Z>
fn push_stage_helper(&self) -> &PushStageHelper<CS, EM, I, OT, S, Z>
Gets the PushStageHelper
fn push_stage_helper_mut(&mut self) -> &mut PushStageHelper<CS, EM, I, OT, S, Z>
fn push_stage_helper_mut(&mut self) -> &mut PushStageHelper<CS, EM, I, OT, S, Z>
Gets the PushStageHelper
(mutable)
Called before the a test case is executed.
Should return the test case to be executed.
After this stage has finished, or if the stage does not process any inputs, this should return None
.
Provided Methods
fn set_current_corpus_idx(&mut self, corpus_idx: usize)
fn set_current_corpus_idx(&mut self, corpus_idx: usize)
Set the current corpus index this stage works on
Called by next_std
when this stage is being initialized.
This is called before the first iteration of the stage.
After the stage has finished once (after deinit
), this will be called again.
Called after the execution of a testcase finished.
Called after the stage finished (pre_exec
returned None
)