mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
fix weight calc, thanks to Marcel
This commit is contained in:
@ -57,7 +57,7 @@ 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 *= (log(q->tc_ref) / avg_top_size);
|
weight *= (1 + (q->tc_ref / avg_top_size));
|
||||||
if (unlikely(q->favored)) weight *= 5;
|
if (unlikely(q->favored)) weight *= 5;
|
||||||
|
|
||||||
return weight;
|
return weight;
|
||||||
@ -104,7 +104,7 @@ void create_alias_table(afl_state_t *afl) {
|
|||||||
|
|
||||||
avg_exec_us += q->exec_us;
|
avg_exec_us += q->exec_us;
|
||||||
avg_bitmap_size += log(q->bitmap_size);
|
avg_bitmap_size += log(q->bitmap_size);
|
||||||
avg_top_size += log(q->tc_ref);
|
avg_top_size += q->tc_ref;
|
||||||
++active;
|
++active;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user