From 51bc1d03284f93f11a4b6d91387327d8c0ba1a60 Mon Sep 17 00:00:00 2001 From: "Dongjia \"toka\" Zhang" Date: Wed, 15 Mar 2023 22:19:23 +0900 Subject: [PATCH] Fix infinite calibration (#1147) * Fix infinite calibration * fmt * fix * fix --- libafl/src/stages/calibrate.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libafl/src/stages/calibrate.rs b/libafl/src/stages/calibrate.rs index ba8b29f37f..e0c57eb304 100644 --- a/libafl/src/stages/calibrate.rs +++ b/libafl/src/stages/calibrate.rs @@ -153,7 +153,7 @@ where let mut unstable_entries: Vec = vec![]; let map_len: usize = map_first.len(); // Run CAL_STAGE_START - 1 times, increase by 2 for every time a new - // run is found to be unstable, with CAL_STAGE_MAX total runs. + // run is found to be unstable or to crash with CAL_STAGE_MAX total runs. let mut i = 1; let mut has_errors = false; @@ -178,11 +178,11 @@ where )?; has_errors = true; - if iter < CAL_STAGE_MAX { - iter += 2; - }; } - continue; + + if iter < CAL_STAGE_MAX { + iter += 2; + }; }; total_time += current_time() - start;