Fix finish_stage call (#3014)

* fixer

* clp

---------

Co-authored-by: toka <toka@tokas-MacBook-Air.local>
This commit is contained in:
Dongjia "toka" Zhang 2025-02-21 12:23:00 +01:00 committed by GitHub
parent 1debeb74a7
commit d40f18f377
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 22 deletions

View File

@ -49,7 +49,7 @@ pub use verify_timeouts::{TimeoutsToVerify, VerifyTimeoutsStage};
use crate::{
corpus::{CorpusId, HasCurrentCorpusId},
events::SendExiting,
state::{HasCurrentStageId, HasExecutions, Stoppable},
state::{HasCurrentStageId, HasExecutions, MaybeHasClientPerfMonitor, Stoppable},
Error, HasNamedMetadata,
};
@ -151,7 +151,7 @@ impl<Head, Tail, E, EM, S, Z> StagesTuple<E, EM, S, Z> for (Head, Tail)
where
Head: Stage<E, EM, S, Z> + Restartable<S>,
Tail: StagesTuple<E, EM, S, Z> + HasConstLen,
S: HasCurrentStageId + Stoppable,
S: HasCurrentStageId + Stoppable + MaybeHasClientPerfMonitor,
EM: SendExiting,
{
/// Performs all stages in the tuple,
@ -192,6 +192,10 @@ where
}
}
// Mark the elapsed time for the scheduler
#[cfg(feature = "introspection")]
state.introspection_stats_mut().finish_stage();
if state.stop_requested() {
state.discard_stop_request();
manager.on_shutdown()?;

View File

@ -163,12 +163,7 @@ where
state: &mut S,
manager: &mut EM,
) -> Result<(), Error> {
let ret = self.perform_mutational(fuzzer, executor, state, manager);
#[cfg(feature = "introspection")]
state.introspection_stats_mut().finish_stage();
ret
self.perform_mutational(fuzzer, executor, state, manager)
}
}

View File

@ -139,9 +139,6 @@ where
fuzzer.evaluate_input(state, executor, manager, &input)?;
}
#[cfg(feature = "introspection")]
state.introspection_stats_mut().finish_stage();
Ok(())
}
}
@ -307,8 +304,6 @@ where
}
self.client.process(fuzzer, state, executor, manager)?;
#[cfg(feature = "introspection")]
state.introspection_stats_mut().finish_stage();
Ok(())
}
}

View File

@ -91,9 +91,6 @@ where
) -> Result<(), Error> {
self.perform_minification(fuzzer, executor, state, manager)?;
#[cfg(feature = "introspection")]
state.introspection_stats_mut().finish_stage();
Ok(())
}
}

View File

@ -210,12 +210,7 @@ where
state: &mut S,
manager: &mut EM,
) -> Result<(), Error> {
let ret = self.perform_mutational(fuzzer, executor, state, manager);
#[cfg(feature = "introspection")]
state.introspection_stats_mut().finish_stage();
ret
self.perform_mutational(fuzzer, executor, state, manager)
}
}