aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-09-19 15:13:15 +0200
committervan Hauser <vh@thc.org>2020-09-19 15:13:15 +0200
commit7ff9800804f6f4f88b70d8aaf882b66e0ce40c8f (patch)
tree67a883a1fe2e870bf4cdb734b996d616622c1b55
parent44c0dc6d961853806a07fa05b948686392ea93fc (diff)
downloadafl++-7ff9800804f6f4f88b70d8aaf882b66e0ce40c8f.tar.gz
fix exploit, mmopt and rare schedule
-rw-r--r--include/afl-fuzz.h14
-rw-r--r--src/afl-fuzz-queue.c2
-rw-r--r--src/afl-fuzz.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h
index 9e469864..9404c417 100644
--- a/include/afl-fuzz.h
+++ b/include/afl-fuzz.h
@@ -243,13 +243,13 @@ enum {
enum {
/* 00 */ EXPLORE, /* AFL default, Exploration-based constant schedule */
- /* 01 */ EXPLOIT, /* AFL's exploitation-based const. */
- /* 02 */ FAST, /* Exponential schedule */
- /* 03 */ COE, /* Cut-Off Exponential schedule */
- /* 04 */ LIN, /* Linear schedule */
- /* 05 */ QUAD, /* Quadratic schedule */
- /* 06 */ RARE, /* Rare edges */
- /* 07 */ MMOPT, /* Modified MOPT schedule */
+ /* 01 */ MMOPT, /* Modified MOPT schedule */
+ /* 02 */ EXPLOIT, /* AFL's exploitation-based const. */
+ /* 03 */ FAST, /* Exponential schedule */
+ /* 04 */ COE, /* Cut-Off Exponential schedule */
+ /* 05 */ LIN, /* Linear schedule */
+ /* 06 */ QUAD, /* Quadratic schedule */
+ /* 07 */ RARE, /* Rare edges */
/* 08 */ SEEK, /* EXPLORE that ignores timings */
POWER_SCHEDULES_NUM
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c
index 336b7f4f..ddd08f1c 100644
--- a/src/afl-fuzz-queue.c
+++ b/src/afl-fuzz-queue.c
@@ -710,7 +710,7 @@ u32 calculate_score(afl_state_t *afl, struct queue_entry *q) {
}
- if (unlikely(afl->schedule >= FAST && afl->schedule <= RARE)) {
+ if (unlikely(afl->schedule >= EXPLOIT && afl->schedule <= QUAD)) {
if (factor > MAX_FACTOR) { factor = MAX_FACTOR; }
perf_score *= factor / POWER_BETA;
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index ea24011e..11037f73 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -1366,7 +1366,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: