diff options
author | Edznux <edznux@gmail.com> | 2020-10-04 16:03:15 +0200 |
---|---|---|
committer | Edznux <edznux@gmail.com> | 2020-10-04 16:03:15 +0200 |
commit | 1e0bc2e5c3fff506bc8bdba9ba96530975c730f1 (patch) | |
tree | 6cfe62b78d6d91482a1f4c240246e14458735856 /src/afl-fuzz-queue.c | |
parent | b0de6fed11d4a8de8f016f1d8db0cb19a6b96eb2 (diff) | |
parent | 44c0dc6d961853806a07fa05b948686392ea93fc (diff) | |
download | afl++-1e0bc2e5c3fff506bc8bdba9ba96530975c730f1.tar.gz |
Merge remote-tracking branch 'origin/dev' into statsd_implem
Diffstat (limited to 'src/afl-fuzz-queue.c')
-rw-r--r-- | src/afl-fuzz-queue.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c index c6d8225f..336b7f4f 100644 --- a/src/afl-fuzz-queue.c +++ b/src/afl-fuzz-queue.c @@ -230,7 +230,7 @@ void add_to_queue(afl_state_t *afl, u8 *fname, u32 len, u8 passed_det) { } else { - afl->q_prev100 = afl->queue = afl->queue_top = q; + afl->queue = afl->queue_top = q; } @@ -239,13 +239,6 @@ void add_to_queue(afl_state_t *afl, u8 *fname, u32 len, u8 passed_det) { afl->cycles_wo_finds = 0; - if (!(afl->queued_paths % 100)) { - - afl->q_prev100->next_100 = q; - afl->q_prev100 = q; - - } - struct queue_entry **queue_buf = afl_realloc( AFL_BUF_PARAM(queue), afl->queued_paths * sizeof(struct queue_entry *)); if (unlikely(!queue_buf)) { PFATAL("alloc"); } @@ -281,15 +274,15 @@ void add_to_queue(afl_state_t *afl, u8 *fname, u32 len, u8 passed_det) { void destroy_queue(afl_state_t *afl) { - struct queue_entry *q = afl->queue, *n; + struct queue_entry *q; + u32 i; - while (q) { + for (i = 0; i < afl->queued_paths; i++) { - n = q->next; + q = afl->queue_buf[i]; ck_free(q->fname); ck_free(q->trace_mini); ck_free(q); - q = n; } @@ -509,7 +502,7 @@ u32 calculate_score(afl_state_t *afl, struct queue_entry *q) { // Longer execution time means longer work on the input, the deeper in // coverage, the better the fuzzing, right? -mh - if (afl->schedule >= RARE && likely(!afl->fixed_seed)) { + if (likely(afl->schedule < RARE) && likely(!afl->fixed_seed)) { if (q->exec_us * 0.1 > avg_exec_us) { |