increase initial memory sized
MODIFY
docs/Changelog.md
docs/Changelog.md
@@ -12,6 +12,8 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
### Version ++2.66d (devel)
- Support for improved afl++ snapshot module:
https://github.com/AFLplusplus/AFL-Snapshot-LKM
+ - Due to the instrumentation needing more memory, the initial memory sizes
+ for -m have been increased
- afl-fuzz:
- added -F option to allow -M main fuzzers to sync to foreign fuzzers,
e.g. honggfuzz or libfuzzer

MODIFY
examples/aflpp_driver/aflpp_driver.c
examples/aflpp_driver/aflpp_driver.c
@@ -109,7 +109,6 @@ If 1, close stdout at startup. If 2 close stderr; if 3 close both.
int __afl_sharedmem_fuzzing = 1;
extern unsigned int * __afl_fuzz_len;
extern unsigned char *__afl_fuzz_ptr;
-// extern struct cmp_map *__afl_cmp_map;
// libFuzzer interface is thin, so we don't include any libFuzzer headers.
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);

MODIFY
include/config.h
include/config.h
#ifndef __NetBSD__
#ifndef WORD_SIZE_64
- #define MEM_LIMIT 25
- #else
#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 200
+ #define MEM_LIMIT 250
#endif
/* Default memory limit when running in QEMU mode (MB): */
-#define MEM_LIMIT_QEMU 200
+#define MEM_LIMIT_QEMU 250
/* Default memory limit when running in Unicorn mode (MB): */
-#define MEM_LIMIT_UNICORN 200
+#define MEM_LIMIT_UNICORN 250
/* Number of calibration cycles per every new test case (and for test
cases that show variable behavior): */

MODIFY
llvm_mode/afl-llvm-rt.o.c
llvm_mode/afl-llvm-rt.o.c
@@ -902,18 +902,14 @@ __attribute__((constructor(0))) void __afl_auto_first(void) {
if (getenv("AFL_DISABLE_LLVM_INSTRUMENTATION")) return;
u8 *ptr;
-
- if (__afl_final_loc > MAP_INITIAL_SIZE) {
+ u32 get_size = __afl_final_loc ? __afl_final_loc : 1024000;
ptr = (u8 *)mmap(NULL, __afl_final_loc, PROT_READ | PROT_WRITE, MAP_PRIVATE,
-1, 0);
-
if (ptr && (ssize_t)ptr != -1) { __afl_area_ptr = ptr; }
}
-}
-
/* The following stuff deals with supporting -fsanitize-coverage=trace-pc-guard.
It remains non-operational in the traditional, plugin-backed LLVM mode.
For more info about 'trace-pc-guard', see llvm_mode/README.md.

increase initial memory sized