diff options
author | van Hauser <vh@thc.org> | 2024-05-26 08:12:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-26 08:12:29 +0200 |
commit | 5bf760510edc6a172d816cd2497dcc0b365d1475 (patch) | |
tree | bc9b137999f7b12b7e3e80e33afb4d06109d35a2 /src/afl-fuzz-queue.c | |
parent | fda3106fd967ec6ee04b99752b57898f33926c57 (diff) | |
parent | 03dc80afc437638cb49bf55f31bcd47c30bc3b28 (diff) | |
download | afl++-5bf760510edc6a172d816cd2497dcc0b365d1475.tar.gz |
Merge pull request #2102 from ndrewh/testcache-fix
fix: testcache hangs for large test cases
Diffstat (limited to 'src/afl-fuzz-queue.c')
-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. |