diff options
Diffstat (limited to 'examples/aflpp_driver/aflpp_driver.c')
-rw-r--r-- | examples/aflpp_driver/aflpp_driver.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/aflpp_driver/aflpp_driver.c b/examples/aflpp_driver/aflpp_driver.c index 2b35a46f..6ec37cda 100644 --- a/examples/aflpp_driver/aflpp_driver.c +++ b/examples/aflpp_driver/aflpp_driver.c @@ -59,6 +59,7 @@ If 1, close stdout at startup. If 2 close stderr; if 3 close both. #include <sys/mman.h> #include "config.h" +#include "cmplog.h" #ifdef _DEBUG #include "hash.h" @@ -109,6 +110,7 @@ int __afl_sharedmem_fuzzing = 1; extern unsigned int * __afl_fuzz_len; extern unsigned char *__afl_fuzz_ptr; extern unsigned char *__afl_area_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); @@ -255,6 +257,7 @@ __attribute__((constructor(10))) void __afl_protect(void) { if ((uint64_t)__afl_area_ptr == -1) __afl_area_ptr = (unsigned char*) mmap(NULL, MAX_DUMMY_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); + __afl_cmp_map = (struct cmp_map *) __afl_area_ptr; } |