aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-10-09 23:23:44 +0200
committervan Hauser <vh@thc.org>2020-10-09 23:23:44 +0200
commit125f8b6ba71fba91735374b1bd07333b19aae635 (patch)
treeeb2ae6521fa72a3c49da0f54a1e622fde425fff8
parentfd4a2dfec2d44879aa7b9eee76978b56a60e7912 (diff)
downloadafl++-125f8b6ba71fba91735374b1bd07333b19aae635.tar.gz
-m none is the default now
-rw-r--r--docs/Changelog.md1
-rw-r--r--examples/persistent_demo/persistent_demo_new.c3
-rw-r--r--include/config.h24
-rw-r--r--src/afl-fuzz-state.c2
-rw-r--r--src/afl-fuzz.c4
5 files changed, 14 insertions, 20 deletions
diff --git a/docs/Changelog.md b/docs/Changelog.md
index 0f923423..ba7028df 100644
--- a/docs/Changelog.md
+++ b/docs/Changelog.md
@@ -14,6 +14,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
- all compilers combined to afl-cc which emulates the previous ones
- afl-llvm/gcc-rt.o merged into afl-compiler-rt.o
- afl-fuzz
+ - memory limits are now disabled by default, set them with -m if required
- Marcel Boehme submitted a patch that improves all AFFast schedules :)
- reading testcases from -i now descends into subdirectories
- allow up to 4 -x command line options
diff --git a/examples/persistent_demo/persistent_demo_new.c b/examples/persistent_demo/persistent_demo_new.c
index 13123d33..b8b4cda0 100644
--- a/examples/persistent_demo/persistent_demo_new.c
+++ b/examples/persistent_demo/persistent_demo_new.c
@@ -37,7 +37,8 @@ unsigned char fuzz_buf[1024000];
#define __AFL_FUZZ_TESTCASE_LEN fuzz_len
#define __AFL_FUZZ_TESTCASE_BUF fuzz_buf
#define __AFL_FUZZ_INIT() void sync(void);
- #define __AFL_LOOP(x) ((fuzz_len = read(0, fuzz_buf, sizeof(fuzz_buf))) > 0 ? 1 : 0)
+ #define __AFL_LOOP(x) \
+ ((fuzz_len = read(0, fuzz_buf, sizeof(fuzz_buf))) > 0 ? 1 : 0)
#define __AFL_INIT() sync()
#endif
diff --git a/include/config.h b/include/config.h
index 3f5c5448..5df604e7 100644
--- a/include/config.h
+++ b/include/config.h
@@ -66,25 +66,17 @@
#define WORD_SIZE_64 1
#endif
-/* Default memory limit for child process (MB): */
-
-#ifndef __NetBSD__
- #ifndef WORD_SIZE_64
- #define MEM_LIMIT 50
- #else
- #define MEM_LIMIT 75
- #endif /* ^!WORD_SIZE_64 */
-#else /* NetBSD's kernel needs more space for stack, see discussion for issue \
- #165 */
- #define MEM_LIMIT 250
-#endif
-/* Default memory limit when running in QEMU mode (MB): */
+/* Default memory limit for child process (MB) 0 = disabled : */
+
+#define MEM_LIMIT 0
+
+/* Default memory limit when running in QEMU mode (MB) 0 = disabled : */
-#define MEM_LIMIT_QEMU 250
+#define MEM_LIMIT_QEMU 0
-/* Default memory limit when running in Unicorn mode (MB): */
+/* Default memory limit when running in Unicorn mode (MB) 0 = disabled : */
-#define MEM_LIMIT_UNICORN 250
+#define MEM_LIMIT_UNICORN 0
/* Number of calibration cycles per every new test case (and for test
cases that show variable behavior): */
diff --git a/src/afl-fuzz-state.c b/src/afl-fuzz-state.c
index 4a1e739f..a8e56e60 100644
--- a/src/afl-fuzz-state.c
+++ b/src/afl-fuzz-state.c
@@ -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 = COE; /* Power schedule (default: COE) */
+ 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 8458b50f..cf0a30c9 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -90,13 +90,13 @@ static void usage(u8 *argv0, int more_help) {
"Execution control settings:\n"
" -p schedule - power schedules compute a seed's performance score:\n"
- " <explore, rare, exploit, seek, mmopt, coe(default), "
+ " <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 "
"or @@)\n"
" -t msec - timeout for each run (auto-scaled, 50-%d ms)\n"
- " -m megs - memory limit for child process (%d MB)\n"
+ " -m megs - memory limit for child process (%d MB, 0 = no limit)\n"
" -Q - use binary-only instrumentation (QEMU mode)\n"
" -U - use unicorn-based instrumentation (Unicorn mode)\n"
" -W - use qemu-based instrumentation with Wine (Wine "