mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 19:38:09 +00:00
prevent weighting < 1
This commit is contained in:
@ -51,13 +51,14 @@ double compute_weight(afl_state_t *afl, struct queue_entry *q,
|
|||||||
if (likely(afl->schedule >= FAST && afl->schedule <= RARE)) {
|
if (likely(afl->schedule >= FAST && afl->schedule <= RARE)) {
|
||||||
|
|
||||||
u32 hits = afl->n_fuzz[q->n_fuzz_entry];
|
u32 hits = afl->n_fuzz[q->n_fuzz_entry];
|
||||||
if (likely(hits)) { weight *= log10(hits) + 1; }
|
if (likely(hits)) { weight *= (log10(hits) + 1); }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (likely(afl->schedule < RARE)) { weight *= (avg_exec_us / q->exec_us); }
|
if (likely(afl->schedule < RARE)) { weight *= (avg_exec_us / q->exec_us); }
|
||||||
weight *= (log(q->bitmap_size) / avg_bitmap_size);
|
weight *= (log(q->bitmap_size) / avg_bitmap_size);
|
||||||
weight *= (1 + (q->tc_ref / avg_top_size));
|
weight *= (1 + (q->tc_ref / avg_top_size));
|
||||||
|
if (unlikely(weight < 1.0)) { weight = 1.0; }
|
||||||
if (unlikely(q->favored)) { weight *= 5; }
|
if (unlikely(q->favored)) { weight *= 5; }
|
||||||
if (unlikely(!q->was_fuzzed)) { weight *= 2; }
|
if (unlikely(!q->was_fuzzed)) { weight *= 2; }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user