Skip to content

Commit

Permalink
Forward on_evaluation callback in MinimizerScheduler (#1122)
Browse files Browse the repository at this point in the history
  • Loading branch information
EliaGeretto committed Mar 5, 2023
1 parent 35e5b87 commit 4f7b59a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libafl/src/schedulers/minimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use crate::{
corpus::{Corpus, CorpusId, Testcase},
feedbacks::MapIndexesMetadata,
inputs::UsesInput,
observers::ObserversTuple,
schedulers::{LenTimeMulTestcaseScore, Scheduler, TestcaseScore},
state::{HasCorpus, HasMetadata, HasRand, UsesState},
Error,
Expand Down Expand Up @@ -162,6 +163,19 @@ where
Ok(())
}

/// An input has been evaluated
fn on_evaluation<OT>(
&mut self,
state: &mut Self::State,
input: &<Self::State as UsesInput>::Input,
observers: &OT,
) -> Result<(), Error>
where
OT: ObserversTuple<Self::State>,
{
self.base.on_evaluation(state, input, observers)
}

/// Gets the next entry
fn next(&mut self, state: &mut CS::State) -> Result<CorpusId, Error> {
self.cull(state)?;
Expand Down

0 comments on commit 4f7b59a

Please sign in to comment.