aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-09-20 14:58:08 +0200
committervan Hauser <vh@thc.org>2020-09-20 14:58:08 +0200
commit5f52f72761fd6bcb2cd9c97fb1cd3a6f05f28ccd (patch)
tree38cb64c1403799220c9529f09658f09ff9acddb0
parent6d996951086460c82eb6f887b7b2db4c6b77e0b2 (diff)
downloadafl++-5f52f72761fd6bcb2cd9c97fb1cd3a6f05f28ccd.tar.gz
set explore as default, fix schedule display
-rw-r--r--custom_mutators/libfuzzer/Makefile2
-rw-r--r--src/afl-fuzz-state.c8
-rw-r--r--src/afl-fuzz.c9
3 files changed, 10 insertions, 9 deletions
diff --git a/custom_mutators/libfuzzer/Makefile b/custom_mutators/libfuzzer/Makefile
index f0c80392..34a358ac 100644
--- a/custom_mutators/libfuzzer/Makefile
+++ b/custom_mutators/libfuzzer/Makefile
@@ -1,7 +1,7 @@
#CFLAGS = -O3 -funroll-loops -fPIC -fpermissive -std=c++11
CFLAGS = -g -O0 -fPIC -fpermissive -std=c++11
-CC := clang++
+CC ?= clang++
all: libfuzzer-mutator.so
diff --git a/src/afl-fuzz-state.c b/src/afl-fuzz-state.c
index 4e817843..ae45d571 100644
--- a/src/afl-fuzz-state.c
+++ b/src/afl-fuzz-state.c
@@ -30,9 +30,9 @@ s8 interesting_8[] = {INTERESTING_8};
s16 interesting_16[] = {INTERESTING_8, INTERESTING_16};
s32 interesting_32[] = {INTERESTING_8, INTERESTING_16, INTERESTING_32};
-char *power_names[POWER_SCHEDULES_NUM] = {"explore", "exploit", "fast",
- "coe", "lin", "quad",
- "rare", "mmopt", "seek"};
+char *power_names[POWER_SCHEDULES_NUM] = {"explore", "mmopt", "exploit",
+ "fast", "coe", "lin",
+ "quad", "rare", "seek"};
/* Initialize MOpt "globals" for this afl state */
@@ -87,7 +87,7 @@ void afl_state_init(afl_state_t *afl, uint32_t map_size) {
afl->w_end = 0.3;
afl->g_max = 5000;
afl->period_pilot_tmp = 5000.0;
- afl->schedule = SEEK; /* Power schedule (default: SEEK) */
+ afl->schedule = EXPLORE; /* Power schedule (default: EXPLORE) */
afl->havoc_max_mult = HAVOC_MAX_MULT;
afl->clear_screen = 1; /* Window resized? */
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 8cfd79e2..002be0be 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -90,7 +90,7 @@ static void usage(u8 *argv0, int more_help) {
"Execution control settings:\n"
" -p schedule - power schedules compute a seed's performance score:\n"
- " <seek (default), explore, rare, exploit, mmopt, coe, "
+ " <explore(default), rare, exploit, seek, mmopt, coe, "
"fast,\n"
" lin, quad> -- see docs/power_schedules.md\n"
" -f file - location read by the fuzzed program (default: stdin "
@@ -246,7 +246,8 @@ int main(int argc, char **argv_orig, char **envp) {
u64 prev_queued = 0;
u32 sync_interval_cnt = 0, seek_to, show_help = 0, map_size = MAP_SIZE;
u8 *extras_dir[4];
- u8 mem_limit_given = 0, exit_1 = 0, debug = 0, extras_dir_cnt = 0/*, have_p = 0*/;
+ u8 mem_limit_given = 0, exit_1 = 0, debug = 0,
+ extras_dir_cnt = 0 /*, have_p = 0*/;
char **use_argv;
struct timeval tv;
@@ -364,7 +365,7 @@ int main(int argc, char **argv_orig, char **envp) {
}
- //have_p = 1;
+ // have_p = 1;
break;
@@ -1366,7 +1367,7 @@ int main(int argc, char **argv_orig, char **envp) {
afl->expand_havoc = 2;
break;
case 2:
- //if (!have_p) afl->schedule = EXPLOIT;
+ // if (!have_p) afl->schedule = EXPLOIT;
afl->expand_havoc = 3;
break;
case 3: