Skip to content

Conversation

@junwha
Copy link
Contributor

@junwha junwha commented Aug 2, 2023

old_seed_selection, /* use vanilla afl seed selection */
reinit_table; /* reinit the queue weight table */
reinit_table, /* reinit the queue weight table */
crashing_seeds_as_new_crash; /* treat crashing seeds as normal corpus */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be in afl_env_vars

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved it as env variable!

"skipping",
fn, (int)(s8)afl->fsrv.crash_exitcode);

} else if (afl->crashing_seeds_as_new_crash) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to take care of a crash with uses_crash_exitcode as well (above)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically, just reverse the if and else parts

Copy link
Contributor Author

@junwha junwha Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved it to the inside of else statement

close(fd);

afl->last_crash_time = get_cur_time();
afl->last_crash_execs = afl->fsrv.total_execs;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you still need to set

q->disabled = 1;
q->perf_score = 0;

so the else should not be an else but mandatory code.

Copy link
Contributor Author

@junwha junwha Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved it to the ouside of else

@vanhauser-thc
Copy link
Member

fyi - in your code change you saved the crash away but do not disable the crashing seed for fuzzing

@junwha
Copy link
Contributor Author

junwha commented Aug 4, 2023

Thank you for your kindness review!:) is there anything else to fix?

@vanhauser-thc
Copy link
Member

finger crossed AFL_CRASHING_SEEDS_AS_NEW_CRASH will behave as it should, that startup code is quite complex with the queue setup :)

@vanhauser-thc vanhauser-thc merged commit b4bd339 into AFLplusplus:dev Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants