mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 19:08:08 +00:00
revert perfscore 0 fix attempt
This commit is contained in:
@ -2211,8 +2211,8 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
cull_queue(afl);
|
cull_queue(afl);
|
||||||
|
|
||||||
// ensure we have at least one seed that is not disabled.
|
// ensure we have at least one seed that is not disabled.
|
||||||
u32 valid_seeds = 0;
|
u32 entry, valid_seeds = 0;
|
||||||
for (u32 entry = 0; entry < afl->queued_items; ++entry)
|
for (entry = 0; entry < afl->queued_items; ++entry)
|
||||||
if (!afl->queue_buf[entry]->disabled) { ++valid_seeds; }
|
if (!afl->queue_buf[entry]->disabled) { ++valid_seeds; }
|
||||||
|
|
||||||
if (!afl->pending_not_fuzzed || !valid_seeds) {
|
if (!afl->pending_not_fuzzed || !valid_seeds) {
|
||||||
@ -2242,7 +2242,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
|
|
||||||
u64 max_ms = 0;
|
u64 max_ms = 0;
|
||||||
|
|
||||||
for (u32 entry = 0; entry < afl->queued_items; ++entry)
|
for (entry = 0; entry < afl->queued_items; ++entry)
|
||||||
if (!afl->queue_buf[entry]->disabled)
|
if (!afl->queue_buf[entry]->disabled)
|
||||||
if (afl->queue_buf[entry]->exec_us > max_ms)
|
if (afl->queue_buf[entry]->exec_us > max_ms)
|
||||||
max_ms = afl->queue_buf[entry]->exec_us;
|
max_ms = afl->queue_buf[entry]->exec_us;
|
||||||
@ -2286,7 +2286,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
#ifdef INTROSPECTION
|
#ifdef INTROSPECTION
|
||||||
u32 prev_saved_crashes = 0, prev_saved_tmouts = 0;
|
u32 prev_saved_crashes = 0, prev_saved_tmouts = 0;
|
||||||
#endif
|
#endif
|
||||||
u32 skip_count = 0, prev_queued_items = 0, runs_in_current_cycle = (u32)-1;
|
u32 prev_queued_items = 0, runs_in_current_cycle = (u32)-1;
|
||||||
u8 skipped_fuzz;
|
u8 skipped_fuzz;
|
||||||
|
|
||||||
#ifdef INTROSPECTION
|
#ifdef INTROSPECTION
|
||||||
@ -2548,54 +2548,6 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
skipped_fuzz = fuzz_one(afl);
|
skipped_fuzz = fuzz_one(afl);
|
||||||
|
|
||||||
if (unlikely(skipped_fuzz)) {
|
|
||||||
|
|
||||||
++skip_count;
|
|
||||||
|
|
||||||
if (unlikely(skip_count > afl->active_items)) {
|
|
||||||
|
|
||||||
if (afl->active_items > 1 && !afl->old_seed_selection) {
|
|
||||||
|
|
||||||
u32 found = 0;
|
|
||||||
for (u32 i = 0; i < afl->queued_items; ++i) {
|
|
||||||
|
|
||||||
if (likely(!afl->queue_buf[i]->disabled &&
|
|
||||||
afl->queue_buf[i]->perf_score == 0)) {
|
|
||||||
|
|
||||||
++found;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (found >= afl->active_items) {
|
|
||||||
|
|
||||||
// all active items have a perf_score of 0 ... damn
|
|
||||||
for (u32 i = 0; i < afl->queued_items; ++i) {
|
|
||||||
|
|
||||||
if (likely(!afl->queue_buf[i]->disabled)) {
|
|
||||||
|
|
||||||
afl->queue_buf[i]->perf_score = afl->queue_buf[i]->weight;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
skip_count = 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
skip_count = 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef INTROSPECTION
|
#ifdef INTROSPECTION
|
||||||
++afl->queue_cur->stats_selected;
|
++afl->queue_cur->stats_selected;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user