aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-08-22 01:30:21 +0200
committerGitHub <noreply@github.com>2020-08-22 01:30:21 +0200
commit42ef1968a530d5fe598d53e93431dfcff3727b4b (patch)
treefe11282ec4997fd685a5aa8766d4d09aa82b89de /src
parent572944d7267e3612ef8da17a180bc3d8f1a958a7 (diff)
parent5ec91fce23ddf3b81076ea4cb4a4553c9c302c3e (diff)
downloadafl++-42ef1968a530d5fe598d53e93431dfcff3727b4b.tar.gz
Merge pull request #521 from AFLplusplus/dev
Push to stable to fix wrong free on exit
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-extras.c2
-rw-r--r--src/afl-fuzz-stats.c17
2 files changed, 11 insertions, 8 deletions
diff --git a/src/afl-fuzz-extras.c b/src/afl-fuzz-extras.c
index 094c30b9..1452c55e 100644
--- a/src/afl-fuzz-extras.c
+++ b/src/afl-fuzz-extras.c
@@ -627,7 +627,7 @@ void destroy_extras(afl_state_t *afl) {
}
- ck_free(afl->extras);
+ afl_free(afl->extras);
}
diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c
index aeb290bd..0ce35cb7 100644
--- a/src/afl-fuzz-stats.c
+++ b/src/afl-fuzz-stats.c
@@ -206,7 +206,8 @@ void maybe_update_plot_file(afl_state_t *afl, double bitmap_cvg, double eps) {
afl->plot_prev_qc == afl->queue_cycle &&
afl->plot_prev_uc == afl->unique_crashes &&
afl->plot_prev_uh == afl->unique_hangs &&
- afl->plot_prev_md == afl->max_depth) ||
+ afl->plot_prev_md == afl->max_depth &&
+ afl->plot_prev_ed == afl->fsrv.total_execs) ||
unlikely(!afl->queue_cycle) ||
unlikely(get_cur_time() - afl->start_time <= 60)) {
@@ -222,6 +223,7 @@ void maybe_update_plot_file(afl_state_t *afl, double bitmap_cvg, double eps) {
afl->plot_prev_uc = afl->unique_crashes;
afl->plot_prev_uh = afl->unique_hangs;
afl->plot_prev_md = afl->max_depth;
+ afl->plot_prev_ed = afl->fsrv.total_execs;
/* Fields in the file:
@@ -229,12 +231,13 @@ void maybe_update_plot_file(afl_state_t *afl, double bitmap_cvg, double eps) {
favored_not_fuzzed, afl->unique_crashes, afl->unique_hangs, afl->max_depth,
execs_per_sec */
- fprintf(afl->fsrv.plot_file,
- "%llu, %llu, %u, %u, %u, %u, %0.02f%%, %llu, %llu, %u, %0.02f\n",
- get_cur_time() / 1000, afl->queue_cycle - 1, afl->current_entry,
- afl->queued_paths, afl->pending_not_fuzzed, afl->pending_favored,
- bitmap_cvg, afl->unique_crashes, afl->unique_hangs, afl->max_depth,
- eps); /* ignore errors */
+ fprintf(
+ afl->fsrv.plot_file,
+ "%llu, %llu, %u, %u, %u, %u, %0.02f%%, %llu, %llu, %u, %0.02f, %llu\n",
+ get_cur_time() / 1000, afl->queue_cycle - 1, afl->current_entry,
+ afl->queued_paths, afl->pending_not_fuzzed, afl->pending_favored,
+ bitmap_cvg, afl->unique_crashes, afl->unique_hangs, afl->max_depth, eps,
+ afl->plot_prev_ed); /* ignore errors */
fflush(afl->fsrv.plot_file);