add execs_done to plot file

This commit is contained in:
van Hauser
2020-08-21 23:33:35 +02:00
parent d5c77a9e96
commit 47878f6974
3 changed files with 12 additions and 8 deletions

View File

@ -13,6 +13,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
- afl-fuzz: - afl-fuzz:
- Fix for auto dictionary entries found during fuzzing to not throw out - Fix for auto dictionary entries found during fuzzing to not throw out
a -x dictionary a -x dictionary
- added total execs done to plot file
- llvm_mode: - llvm_mode:
- Ported SanCov to LTO, and made it the default for LTO. better - Ported SanCov to LTO, and made it the default for LTO. better
instrumentation locations instrumentation locations

View File

@ -624,7 +624,7 @@ typedef struct afl_state {
/* plot file saves from last run */ /* plot file saves from last run */
u32 plot_prev_qp, plot_prev_pf, plot_prev_pnf, plot_prev_ce, plot_prev_md; u32 plot_prev_qp, plot_prev_pf, plot_prev_pnf, plot_prev_ce, plot_prev_md;
u64 plot_prev_qc, plot_prev_uc, plot_prev_uh; u64 plot_prev_qc, plot_prev_uc, plot_prev_uh, plot_prev_ed;
u64 stats_last_stats_ms, stats_last_plot_ms, stats_last_ms, stats_last_execs; u64 stats_last_stats_ms, stats_last_plot_ms, stats_last_ms, stats_last_execs;
double stats_avg_exec; double stats_avg_exec;

View File

@ -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_qc == afl->queue_cycle &&
afl->plot_prev_uc == afl->unique_crashes && afl->plot_prev_uc == afl->unique_crashes &&
afl->plot_prev_uh == afl->unique_hangs && 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(!afl->queue_cycle) ||
unlikely(get_cur_time() - afl->start_time <= 60)) { 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_uc = afl->unique_crashes;
afl->plot_prev_uh = afl->unique_hangs; 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;
/* Fields in the file: /* 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, favored_not_fuzzed, afl->unique_crashes, afl->unique_hangs, afl->max_depth,
execs_per_sec */ execs_per_sec */
fprintf(afl->fsrv.plot_file, fprintf(
"%llu, %llu, %u, %u, %u, %u, %0.02f%%, %llu, %llu, %u, %0.02f\n", 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, get_cur_time() / 1000, afl->queue_cycle - 1, afl->current_entry,
afl->queued_paths, afl->pending_not_fuzzed, afl->pending_favored, afl->queued_paths, afl->pending_not_fuzzed, afl->pending_favored,
bitmap_cvg, afl->unique_crashes, afl->unique_hangs, afl->max_depth, bitmap_cvg, afl->unique_crashes, afl->unique_hangs, afl->max_depth, eps,
eps); /* ignore errors */ afl->plot_prev_ed); /* ignore errors */
fflush(afl->fsrv.plot_file); fflush(afl->fsrv.plot_file);