fuzz until first solution
This commit is contained in:
parent
6551fc31f4
commit
67165640c5
@ -507,7 +507,7 @@ fn fuzz(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fuzzer
|
fuzzer
|
||||||
.fuzz_loop(&mut stages, &mut executor, &mut state, &mut mgr)
|
.fuzz_for_solution(&mut stages, &mut executor, &mut state, &mut mgr)
|
||||||
.expect("Error in the fuzzing loop");
|
.expect("Error in the fuzzing loop");
|
||||||
|
|
||||||
// Never reached
|
// Never reached
|
||||||
|
@ -150,7 +150,7 @@ pub trait Fuzzer<E, EM, I, S, ST>
|
|||||||
where
|
where
|
||||||
I: Input,
|
I: Input,
|
||||||
EM: ProgressReporter<I>,
|
EM: ProgressReporter<I>,
|
||||||
S: HasExecutions + HasClientPerfMonitor,
|
S: HasExecutions + HasClientPerfMonitor + HasSolutions<I>,
|
||||||
{
|
{
|
||||||
/// Fuzz for a single iteration
|
/// Fuzz for a single iteration
|
||||||
/// Returns the index of the last fuzzed corpus item
|
/// Returns the index of the last fuzzed corpus item
|
||||||
@ -182,6 +182,26 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Fuzz until the first solution.
|
||||||
|
fn fuzz_for_solution(
|
||||||
|
&mut self,
|
||||||
|
stages: &mut ST,
|
||||||
|
executor: &mut E,
|
||||||
|
state: &mut S,
|
||||||
|
manager: &mut EM,
|
||||||
|
) -> Result<usize, Error> {
|
||||||
|
let mut last = current_time();
|
||||||
|
let monitor_timeout = STATS_TIMEOUT_DEFAULT;
|
||||||
|
let mut done = false;
|
||||||
|
let mut tiem = 0;
|
||||||
|
while !done {
|
||||||
|
self.fuzz_one(stages, executor, state, manager)?;
|
||||||
|
last = manager.maybe_report_progress(state, last, monitor_timeout)?;
|
||||||
|
done = state.solutions().count() > 1;
|
||||||
|
}
|
||||||
|
return Ok(0);
|
||||||
|
}
|
||||||
|
|
||||||
/// Fuzz for n iterations
|
/// Fuzz for n iterations
|
||||||
/// Returns the index of the last fuzzed corpus item
|
/// Returns the index of the last fuzzed corpus item
|
||||||
///
|
///
|
||||||
@ -513,7 +533,7 @@ where
|
|||||||
EM: EventManager<E, I, S, Self>,
|
EM: EventManager<E, I, S, Self>,
|
||||||
F: Feedback<I, S>,
|
F: Feedback<I, S>,
|
||||||
I: Input,
|
I: Input,
|
||||||
S: HasClientPerfMonitor + HasExecutions,
|
S: HasClientPerfMonitor + HasExecutions + HasSolutions<I>,
|
||||||
OF: Feedback<I, S>,
|
OF: Feedback<I, S>,
|
||||||
ST: StagesTuple<E, EM, S, Self>,
|
ST: StagesTuple<E, EM, S, Self>,
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user