mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-09 00:31:33 +00:00
better new weighting
This commit is contained in:
parent
36127fb197
commit
dba93705a7
@ -74,14 +74,16 @@ double compute_weight(afl_state_t *afl, struct queue_entry *q,
|
|||||||
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(afl->prefer_new)) {
|
||||||
|
|
||||||
|
weight *= (2.0 * ((1 + q->id) / afl->queued_items));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (unlikely(weight < 0.1)) { weight = 0.1; }
|
if (unlikely(weight < 0.1)) { weight = 0.1; }
|
||||||
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; }
|
||||||
if (unlikely(afl->prefer_new)) {
|
|
||||||
|
|
||||||
weight *= (2.0 * (q->id / (afl->queued_items - 1)));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return weight;
|
return weight;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user