about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-08-06 18:51:16 +0200
committervan Hauser <vh@thc.org>2020-08-06 18:51:16 +0200
commit8190436f8f78d0bef799461447ddd37e9290c0aa (patch)
treec1f2842ca16a32d76c8a3602fe05dc628d3ae40f
parent08bcaa135f6fc9282a947e1c73ef0866cb4cf2d0 (diff)
downloadafl++-8190436f8f78d0bef799461447ddd37e9290c0aa.tar.gz
fix
-rw-r--r--examples/aflpp_driver/aflpp_driver.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/aflpp_driver/aflpp_driver.c b/examples/aflpp_driver/aflpp_driver.c
index eab6b52c..b9c1e7b3 100644
--- a/examples/aflpp_driver/aflpp_driver.c
+++ b/examples/aflpp_driver/aflpp_driver.c
@@ -64,6 +64,10 @@ If 1, close stdout at startup. If 2 close stderr; if 3 close both.
   #include "hash.h"
 #endif
 
+#ifndef MAP_FIXED_NOREPLACE
+#define MAP_FIXED_NOREPLACE	0x100000
+#endif
+
 // Platform detection. Copied from FuzzerInternal.h
 #ifdef __linux__
   #define LIBFUZZER_LINUX 1
@@ -245,6 +249,7 @@ int main(int argc, char **argv) {
   uint8_t *dummy = (uint8_t*) mmap((void *)0x1000,250000, PROT_READ | PROT_WRITE,
              MAP_FIXED_NOREPLACE | MAP_SHARED | MAP_ANONYMOUS, -1, 0);
   __afl_area_ptr = dummy;
+  fprintf(stderr, "dummy: %p\n", __afl_area_ptr);
 
   printf(
       "======================= INFO =========================\n"