diff options
author | Dominik Maier <domenukk@gmail.com> | 2020-03-19 19:22:57 +0100 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2020-03-19 19:22:57 +0100 |
commit | 51a346bcbeb66d159b01c6fd37616824c32ee569 (patch) | |
tree | be8905240e82048911a5ae40c32faa45b50c76a2 /src/afl-fuzz-globals.c | |
parent | fd9587d26e6e3250fd01b983243bd3cb17268a54 (diff) | |
download | afl++-51a346bcbeb66d159b01c6fd37616824c32ee569.tar.gz |
50% less globals
Diffstat (limited to 'src/afl-fuzz-globals.c')
-rw-r--r-- | src/afl-fuzz-globals.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/afl-fuzz-globals.c b/src/afl-fuzz-globals.c index efffa749..dbd8c835 100644 --- a/src/afl-fuzz-globals.c +++ b/src/afl-fuzz-globals.c @@ -78,6 +78,8 @@ list_t afl_states = {.element_prealloc_count = 0}; void afl_state_init(afl_state_t *afl) { + memset(afl, 0, sizeof(afl_state_t)); + afl->w_init = 0.9; afl->w_end = 0.3; afl->g_max = 5000; @@ -114,6 +116,29 @@ void afl_state_init(afl_state_t *afl) { afl->fsrv.child_pid = -1; afl->fsrv.out_dir_fd = -1; + afl->cmplog_prev_timed_out = 0; + + /* statis file */ + afl->last_bitmap_cvg = 0; + afl->last_stability = 0; + afl->last_eps = 0; + + /* plot file saves from last run */ + afl->plot_prev_qp = 0; + afl->plot_prev_pf = 0; + afl->plot_prev_pnf = 0; + afl->plot_prev_ce = 0; + afl->plot_prev_md = 0; + afl->plot_prev_qc = 0; + afl->plot_prev_uc = 0; + afl->plot_prev_uh = 0; + + afl->stats_last_stats_ms = 0; + afl->stats_last_plot_ms = 0; + afl->stats_last_ms = 0; + afl->stats_last_execs = 0; + afl->stats_avg_exec = -1; + init_mopt_globals(afl); list_append(&afl_states, afl); |