diff options
author | van Hauser <vh@thc.org> | 2020-05-11 10:45:20 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-05-11 10:45:20 +0200 |
commit | 41f6aa794022d9cd34642ac7b57a70c9094f0e8c (patch) | |
tree | c08915b02f292a4eea591e3e8434dcc16ee431b8 /llvm_mode | |
parent | 50a63777ec4b3de137aaa6968b738b084dccf007 (diff) | |
download | afl++-41f6aa794022d9cd34642ac7b57a70c9094f0e8c.tar.gz |
bigger initial map when LTO
Diffstat (limited to 'llvm_mode')
-rw-r--r-- | llvm_mode/afl-llvm-rt-lto.o.c | 3 | ||||
-rw-r--r-- | llvm_mode/afl-llvm-rt.o.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/llvm_mode/afl-llvm-rt-lto.o.c b/llvm_mode/afl-llvm-rt-lto.o.c index 5921f968..3606cedd 100644 --- a/llvm_mode/afl-llvm-rt-lto.o.c +++ b/llvm_mode/afl-llvm-rt-lto.o.c @@ -10,6 +10,8 @@ */ +#include <stdio.h> + // to prevent the function from being removed unsigned char __afl_lto_mode = 0; @@ -17,6 +19,7 @@ unsigned char __afl_lto_mode = 0; __attribute__((constructor(0))) void __afl_auto_init_globals(void) { + if (getenv("AFL_DEBUG")) fprintf(stderr, "[__afl_auto_init_globals]\n"); __afl_lto_mode = 1; } diff --git a/llvm_mode/afl-llvm-rt.o.c b/llvm_mode/afl-llvm-rt.o.c index 56038f7a..ce8df332 100644 --- a/llvm_mode/afl-llvm-rt.o.c +++ b/llvm_mode/afl-llvm-rt.o.c @@ -63,7 +63,11 @@ 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. */ -u8 __afl_area_initial[MAP_SIZE]; +#ifdef AFL_REAL_LD +u8 __afl_area_initial[256000]; +#else +u8 __afl_area_initial[MAP_SIZE]; +#endif u8 *__afl_area_ptr = __afl_area_initial; u8 *__afl_dictionary; |