about summary refs log tree commit diff
path: root/src/afl-fuzz.c
diff options
context:
space:
mode:
authorvj-27 <vimal.joseph.027@gmail.com>2021-02-05 19:46:24 +0000
committervj-27 <vimal.joseph.027@gmail.com>2021-02-05 19:46:24 +0000
commit1a8c242d280066b7bfb36897c91215d4f4b5eb01 (patch)
tree0a957b8c94ee27454d0b11c00de7d807980baf91 /src/afl-fuzz.c
parent6f163bb0c50a103dc4565ec5f0b8b9b94b5c16f6 (diff)
downloadafl++-1a8c242d280066b7bfb36897c91215d4f4b5eb01.tar.gz
load run time and donot load pending_* or *_favoured
Diffstat (limited to 'src/afl-fuzz.c')
-rw-r--r--src/afl-fuzz.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 6c617b18..b7cd251a 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -1682,7 +1682,11 @@ int main(int argc, char **argv_orig, char **envp) {
 
   if (unlikely(afl->old_seed_selection)) seek_to = find_start_position(afl);
 
-  if (afl->in_place_resume || afl->afl_env.afl_autoresume) load_stats_file(afl);
+  u32 prev_run_time = 0;  // to not call load_stats_file again after line 1705
+  afl->start_time = get_cur_time();  // without this, time taken for
+                                     // perform_dry_run gets added to run time.
+  if (afl->in_place_resume || afl->afl_env.afl_autoresume)
+    prev_run_time = load_stats_file(afl);
   write_stats_file(afl, 0, 0, 0);
   maybe_update_plot_file(afl, 0, 0);
   save_auto(afl);
@@ -1701,6 +1705,8 @@ int main(int argc, char **argv_orig, char **envp) {
   // (void)nice(-20);  // does not improve the speed
   // real start time, we reset, so this works correctly with -V
   afl->start_time = get_cur_time();
+  if (afl->in_place_resume || afl->afl_env.afl_autoresume)
+    afl->start_time -= prev_run_time;
 
   u32 runs_in_current_cycle = (u32)-1;
   u32 prev_queued_paths = 0;