about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-05-22 16:56:05 +0200
committervan Hauser <vh@thc.org>2020-05-22 16:56:05 +0200
commit74f01881e36e45005ed2080e351323367532ee01 (patch)
treea71664f4f575ff8c786a90587f0dc08b35990794
parent0f8da71588ecf0de4b7e56754107c2fedd6cbb0f (diff)
downloadafl++-74f01881e36e45005ed2080e351323367532ee01.tar.gz
small enhancements for llvm11
-rw-r--r--llvm_mode/afl-llvm-rt.o.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm_mode/afl-llvm-rt.o.c b/llvm_mode/afl-llvm-rt.o.c
index 0583cb5f..dac35796 100644
--- a/llvm_mode/afl-llvm-rt.o.c
+++ b/llvm_mode/afl-llvm-rt.o.c
@@ -63,8 +63,14 @@
    is used for instrumentation output before __afl_map_shm() has a chance to
    run. It will end up as .comm, so it shouldn't be too wasteful. */
 
+#if MAP_SIZE <= 65536
+  #define MAP_INITIAL_SIZE 256000
+#else
+  #define MAP_INITIAL_SIZE MAP_SIZE
+#endif
+
 #ifdef AFL_REAL_LD
-u8 __afl_area_initial[256000];
+u8 __afl_area_initial[MAP_INITIAL_SIZE];
 #else
 u8                  __afl_area_initial[MAP_SIZE];
 #endif