diff options
author | van Hauser <vh@thc.org> | 2020-10-23 14:05:34 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-10-23 14:05:34 +0200 |
commit | 0e748ccda713708de6a501d23a58788aba9d0b03 (patch) | |
tree | b230604ee36707eb0546c242bcfe05e32e1cd428 /src/afl-fuzz-state.c | |
parent | c866aef37fcf799506d93b9a47d4eb2b77c75f5b (diff) | |
download | afl++-0e748ccda713708de6a501d23a58788aba9d0b03.tar.gz |
set max testcache entries automated if not specified by the user
Diffstat (limited to 'src/afl-fuzz-state.c')
-rw-r--r-- | src/afl-fuzz-state.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/afl-fuzz-state.c b/src/afl-fuzz-state.c index 0824b77f..ae7d410b 100644 --- a/src/afl-fuzz-state.c +++ b/src/afl-fuzz-state.c @@ -103,7 +103,8 @@ void afl_state_init(afl_state_t *afl, uint32_t map_size) { afl->stats_avg_exec = -1; afl->skip_deterministic = 1; afl->use_splicing = 1; - afl->q_testcase_max_cache_size = TESTCASE_CACHE * 1024000; + afl->q_testcase_max_cache_size = TESTCASE_CACHE_SIZE * 1048576UL; + afl->q_testcase_max_cache_entries = 4096; #ifdef HAVE_AFFINITY afl->cpu_aff = -1; /* Selected CPU core */ @@ -361,6 +362,13 @@ void read_afl_environment(afl_state_t *afl, char **envp) { afl->afl_env.afl_testcache_size = (u8 *)get_afl_env(afl_environment_variables[i]); + } else if (!strncmp(env, "AFL_TESTCACHE_ENTRIES", + + afl_environment_variable_len)) { + + afl->afl_env.afl_testcache_entries = + (u8 *)get_afl_env(afl_environment_variables[i]); + } else if (!strncmp(env, "AFL_STATSD_HOST", afl_environment_variable_len)) { |