From 9afba51ec1e0aaae2446bb7f9a9fa2baddea9044 Mon Sep 17 00:00:00 2001 From: Martin Leitner-Ankerl Date: Thu, 19 Dec 2024 07:59:45 +0100 Subject: [PATCH] renamed last_avg_execs -> last_avg_total_execs This should make it a bit more clear that it stores the total number of executions from the previous update --- include/afl-fuzz.h | 2 +- src/afl-fuzz-stats.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h index 070457c9..b5f42d9f 100644 --- a/include/afl-fuzz.h +++ b/include/afl-fuzz.h @@ -747,7 +747,7 @@ typedef struct afl_state { up to 256 */ unsigned long long int last_avg_exec_update; - u64 last_avg_execs; + u64 last_avg_total_execs; double last_avg_execs_saved; /* foreign sync */ diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c index e0127e54..a5785eb8 100644 --- a/src/afl-fuzz-stats.c +++ b/src/afl-fuzz-stats.c @@ -340,9 +340,9 @@ void write_stats_file(afl_state_t *afl, u32 t_bytes, double bitmap_cvg, cur_time - afl->last_avg_exec_update >= 60000))) { afl->last_avg_execs_saved = - (double)(1000 * (afl->fsrv.total_execs - afl->last_avg_execs)) / + (double)(1000 * (afl->fsrv.total_execs - afl->last_avg_total_execs)) / (double)(cur_time - afl->last_avg_exec_update); - afl->last_avg_execs = afl->fsrv.total_execs; + afl->last_avg_total_execs = afl->fsrv.total_execs; afl->last_avg_exec_update = cur_time; }