mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-12 01:58:17 +00:00
no random timing for -s fixed_seed
This commit is contained in:
@ -186,7 +186,7 @@ void update_bitmap_score(afl_state_t *afl, struct queue_entry *q) {
|
|||||||
u64 fav_factor;
|
u64 fav_factor;
|
||||||
u64 fuzz_p2 = next_pow2(q->n_fuzz);
|
u64 fuzz_p2 = next_pow2(q->n_fuzz);
|
||||||
|
|
||||||
if (afl->schedule == MMOPT || afl->schedule == RARE)
|
if (afl->schedule == MMOPT || afl->schedule == RARE || unlikely(afl->fixed_seed))
|
||||||
fav_factor = q->len << 2;
|
fav_factor = q->len << 2;
|
||||||
else
|
else
|
||||||
fav_factor = q->exec_us * q->len;
|
fav_factor = q->exec_us * q->len;
|
||||||
@ -203,7 +203,7 @@ void update_bitmap_score(afl_state_t *afl, struct queue_entry *q) {
|
|||||||
u64 top_rated_fav_factor;
|
u64 top_rated_fav_factor;
|
||||||
u64 top_rated_fuzz_p2 = next_pow2(afl->top_rated[i]->n_fuzz);
|
u64 top_rated_fuzz_p2 = next_pow2(afl->top_rated[i]->n_fuzz);
|
||||||
|
|
||||||
if (afl->schedule == MMOPT || afl->schedule == RARE)
|
if (afl->schedule == MMOPT || afl->schedule == RARE || unlikely(afl->fixed_seed))
|
||||||
top_rated_fav_factor = afl->top_rated[i]->len << 2;
|
top_rated_fav_factor = afl->top_rated[i]->len << 2;
|
||||||
else
|
else
|
||||||
top_rated_fav_factor =
|
top_rated_fav_factor =
|
||||||
@ -214,8 +214,17 @@ void update_bitmap_score(afl_state_t *afl, struct queue_entry *q) {
|
|||||||
else if (fuzz_p2 == top_rated_fuzz_p2)
|
else if (fuzz_p2 == top_rated_fuzz_p2)
|
||||||
if (fav_factor > top_rated_fav_factor) continue;
|
if (fav_factor > top_rated_fav_factor) continue;
|
||||||
|
|
||||||
if (fav_factor > afl->top_rated[i]->exec_us * afl->top_rated[i]->len)
|
if (afl->schedule == MMOPT || afl->schedule == RARE || unlikely(afl->fixed_seed)) {
|
||||||
continue;
|
|
||||||
|
if (fav_factor > afl->top_rated[i]->len << 2)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (fav_factor > afl->top_rated[i]->exec_us * afl->top_rated[i]->len)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* Looks like we're going to win. Decrease ref count for the
|
/* Looks like we're going to win. Decrease ref count for the
|
||||||
previous winner, discard its afl->fsrv.trace_bits[] if necessary. */
|
previous winner, discard its afl->fsrv.trace_bits[] if necessary. */
|
||||||
@ -330,7 +339,7 @@ u32 calculate_score(afl_state_t *afl, struct queue_entry *q) {
|
|||||||
// Longer execution time means longer work on the input, the deeper in
|
// Longer execution time means longer work on the input, the deeper in
|
||||||
// coverage, the better the fuzzing, right? -mh
|
// coverage, the better the fuzzing, right? -mh
|
||||||
|
|
||||||
if (afl->schedule != MMOPT && afl->schedule != RARE) {
|
if (afl->schedule != MMOPT && afl->schedule != RARE && likely(!afl->fixed_seed)) {
|
||||||
|
|
||||||
if (q->exec_us * 0.1 > avg_exec_us)
|
if (q->exec_us * 0.1 > avg_exec_us)
|
||||||
perf_score = 10;
|
perf_score = 10;
|
||||||
|
Reference in New Issue
Block a user