diff options
author | Andrew Haberlandt <ahaberla@andrew.cmu.edu> | 2024-05-25 19:58:48 +0000 |
---|---|---|
committer | Andrew Haberlandt <ahaberla@andrew.cmu.edu> | 2024-05-25 23:44:57 +0000 |
commit | 03dc80afc437638cb49bf55f31bcd47c30bc3b28 (patch) | |
tree | bc9b137999f7b12b7e3e80e33afb4d06109d35a2 /src | |
parent | fda3106fd967ec6ee04b99752b57898f33926c57 (diff) | |
download | afl++-03dc80afc437638cb49bf55f31bcd47c30bc3b28.tar.gz |
fix: testcache hangs for large test cases
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-fuzz-queue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c index 2318df60..784b377a 100644 --- a/src/afl-fuzz-queue.c +++ b/src/afl-fuzz-queue.c @@ -1301,7 +1301,8 @@ inline u8 *queue_testcase_get(afl_state_t *afl, struct queue_entry *q) { static u32 do_once = 0; // because even threaded we would want this. WIP while (unlikely( - afl->q_testcase_cache_size + len >= afl->q_testcase_max_cache_size || + (afl->q_testcase_cache_size + len >= afl->q_testcase_max_cache_size && + afl->q_testcase_cache_count > 1) || afl->q_testcase_cache_count >= afl->q_testcase_max_cache_entries - 1)) { /* We want a max number of entries to the cache that we learn. |