From b9edb29d8b07581499c8d3a4fa32638c3e6b9ecc Mon Sep 17 00:00:00 2001 From: Toka Date: Mon, 13 Sep 2021 21:24:31 +0900 Subject: [PATCH] PowerSchedule::COE fix (#295) --- libafl/src/stages/power.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libafl/src/stages/power.rs b/libafl/src/stages/power.rs index 4f984c8715..2b5a19a1da 100644 --- a/libafl/src/stages/power.rs +++ b/libafl/src/stages/power.rs @@ -79,7 +79,6 @@ where /// Gets the number of iterations as a random number fn iterations(&self, state: &mut S, corpus_idx: usize) -> Result { - let mut testcase = state.corpus().get(corpus_idx)?.borrow_mut(); let psmeta = state .metadata() .get::() @@ -89,6 +88,7 @@ where if self.strat == PowerSchedule::COE { fuzz_mu = self.fuzz_mu(state, psmeta)?; } + let mut testcase = state.corpus().get(corpus_idx)?.borrow_mut(); // 1 + state.rand_mut().below(DEFAULT_MUTATIONAL_MAX_ITERATIONS) as usize self.calculate_score(&mut testcase, psmeta, fuzz_mu)