diff options
author | van Hauser <vh@thc.org> | 2021-03-01 10:12:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 10:12:04 +0100 |
commit | bd0a23de73011a390714b9f3836a46443054fdd5 (patch) | |
tree | 9b2335f357e84e18e4c8259581360923921ca8b2 /instrumentation | |
parent | 5cf0655071a83b1c87490be8399fe2365f087223 (diff) | |
parent | 4619a1395b9a414e5e11148d79fde3a7fa348e87 (diff) | |
download | afl++-3.10c.tar.gz |
Merge pull request #767 from AFLplusplus/dev 3.10c
Final push for release
Diffstat (limited to 'instrumentation')
-rw-r--r-- | instrumentation/afl-compiler-rt.o.c | 8 | ||||
-rw-r--r-- | instrumentation/afl-llvm-lto-instrumentation.so.cc | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c index e4aeadfa..ecb94cab 100644 --- a/instrumentation/afl-compiler-rt.o.c +++ b/instrumentation/afl-compiler-rt.o.c @@ -244,8 +244,12 @@ static void __afl_map_shm(void) { if (__afl_final_loc) { - if (__afl_final_loc % 32) - __afl_final_loc = (((__afl_final_loc + 31) >> 5) << 5); + if (__afl_final_loc % 64) { + + __afl_final_loc = (((__afl_final_loc + 63) >> 6) << 6); + + } + __afl_map_size = __afl_final_loc; if (__afl_final_loc > MAP_SIZE) { diff --git a/instrumentation/afl-llvm-lto-instrumentation.so.cc b/instrumentation/afl-llvm-lto-instrumentation.so.cc index f5c24e41..137bae2c 100644 --- a/instrumentation/afl-llvm-lto-instrumentation.so.cc +++ b/instrumentation/afl-llvm-lto-instrumentation.so.cc @@ -924,9 +924,7 @@ bool AFLLTOPass::runOnModule(Module &M) { if (getenv("AFL_LLVM_LTO_DONTWRITEID") == NULL) { - uint32_t write_loc = afl_global_id; - - if (afl_global_id % 32) write_loc = (((afl_global_id + 32) >> 4) << 4); + uint32_t write_loc = (((afl_global_id + 63) >> 6) << 6); GlobalVariable *AFLFinalLoc = new GlobalVariable( M, Int32Ty, true, GlobalValue::ExternalLinkage, 0, "__afl_final_loc"); |