mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-08 08:11:34 +00:00
score
This commit is contained in:
parent
d869913efa
commit
3f065ea70a
@ -65,6 +65,12 @@ double compute_weight(afl_state_t *afl, struct queue_entry *q,
|
||||
double avg_exec_us, double avg_bitmap_size,
|
||||
double avg_top_size, double avg_score) {
|
||||
|
||||
if (unlikely(afl->fuzz_mode && avg_score > 0)) {
|
||||
|
||||
return q->score / avg_score;
|
||||
|
||||
} else {
|
||||
|
||||
double weight = 1.0;
|
||||
|
||||
if (likely(afl->schedule >= FAST && afl->schedule <= RARE)) {
|
||||
@ -75,7 +81,8 @@ double compute_weight(afl_state_t *afl, struct queue_entry *q,
|
||||
}
|
||||
|
||||
#ifdef DEBUG_QUEUE
|
||||
fprintf(stderr, "WEIGHT id=%u fname=%s start_weight=1.0\n", q->id, q->fname);
|
||||
fprintf(stderr, "WEIGHT id=%u fname=%s start_weight=1.0\n", q->id,
|
||||
q->fname);
|
||||
fprintf(stderr, " after step 1: %.2f (log10(hits))\n", weight);
|
||||
#endif
|
||||
if (likely(afl->schedule < RARE)) { weight *= (avg_exec_us / q->exec_us); }
|
||||
@ -117,6 +124,8 @@ double compute_weight(afl_state_t *afl, struct queue_entry *q,
|
||||
|
||||
return weight;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* create the alias table that allows weighted random selection - expensive */
|
||||
|
Loading…
x
Reference in New Issue
Block a user