Patching and improving AFLFast schedules.

This commit is contained in:
Marcel Boehme
2020-09-29 11:53:27 +00:00
parent e69b25e34b
commit e87eca7fe8
6 changed files with 81 additions and 48 deletions

View File

@ -555,19 +555,9 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
cksum = hash64(afl->fsrv.trace_bits, afl->fsrv.map_size, HASH_CONST);
struct queue_entry *q = afl->queue;
while (q) {
if (q->exec_cksum == cksum) {
++q->n_fuzz;
break;
}
q = q->next;
}
/* Saturated increment */
if (afl->n_fuzz[cksum % n_fuzz_size] < 0xFFFFFFFF)
afl->n_fuzz[cksum % n_fuzz_size]++;
}
@ -610,6 +600,8 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
afl->queue_top->exec_cksum =
hash64(afl->fsrv.trace_bits, afl->fsrv.map_size, HASH_CONST);
afl->n_fuzz[cksum % n_fuzz_size] = 1;
/* Try to calibrate inline; this also calls update_bitmap_score() when
successful. */