diff options
author | van Hauser <vh@thc.org> | 2020-08-06 20:02:47 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-08-06 20:02:47 +0200 |
commit | cb3631a3223806210a781f1138508b37d4f6d761 (patch) | |
tree | 1702327082f7ee0913787206db19b8e696c95a7a /examples/aflpp_driver/aflpp_driver.c | |
parent | bd1d148f83d0c32d5bcc1d86a4109cf87a17b276 (diff) | |
download | afl++-cb3631a3223806210a781f1138508b37d4f6d761.tar.gz |
add cmplog map to aflpp driver
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; } |