final touches for skipdet

This commit is contained in:
vanhauser-thc
2024-02-01 15:22:51 +01:00
parent 06f0982f0f
commit 5ba66a8860
6 changed files with 25 additions and 15 deletions

View File

@ -1019,7 +1019,9 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
if (status >= 0x41464c00 && status <= 0x41464cff) {
FATAL("Target uses the new forkserver model, you need to switch to a newer afl-fuzz too!");
FATAL(
"Target uses the new forkserver model, you need to switch to a newer "
"afl-fuzz too!");
}

View File

@ -102,7 +102,7 @@ void afl_state_init(afl_state_t *afl, uint32_t map_size) {
afl->stats_update_freq = 1;
afl->stats_file_update_freq_msecs = STATS_UPDATE_SEC * 1000;
afl->stats_avg_exec = 0;
afl->skip_deterministic = 0;
afl->skip_deterministic = 1;
afl->sync_time = SYNC_TIME;
afl->cmplog_lvl = 2;
afl->min_length = 1;

View File

@ -170,7 +170,7 @@ static void usage(u8 *argv0, int more_help) {
" -g minlength - set min length of generated fuzz input (default: 1)\n"
" -G maxlength - set max length of generated fuzz input (default: "
"%lu)\n"
" -D - enable deterministic fuzzing (once per queue entry)\n"
" -D - enable (a new) effective deterministic fuzzing\n"
" -L minutes - use MOpt(imize) mode and set the time limit for "
"entering the\n"
" pacemaker mode (minutes of no new finds). 0 = "
@ -955,16 +955,22 @@ int main(int argc, char **argv_orig, char **envp) {
break;
case 'D': /* no deterministic */
afl->skip_deterministic = 1;
break;
case 'd': /* partial deterministic */
case 'D': /* partial deterministic */
afl->skip_deterministic = 0;
break;
case 'd': /* no deterministic */
// this is the default and currently a lot of infrastructure enforces
// it (e.g. clusterfuzz, fuzzbench) based on that this feature
// originally was bad performance wise. We now have a better
// implementation, hence if it is activated, we do not want to
// deactivate it by such setups.
// afl->skip_deterministic = 1;
break;
case 'B': /* load bitmap */
/* This is a secret undocumented option! It is useful if you find
@ -1424,11 +1430,11 @@ int main(int argc, char **argv_orig, char **envp) {
}
#endif
// silently disable deterministic mutation if custom mutators are used
if (!afl->skip_deterministic && afl->afl_env.afl_custom_mutator_only) {
FATAL(
"Using -D determinstic fuzzing is incompatible with "
"AFL_CUSTOM_MUTATOR_ONLY!");
afl->skip_deterministic = 1;
}