about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKuang-che Wu <kcwu@chromium.org>2021-10-30 22:27:49 +0800
committerKuang-che Wu <kcwu@chromium.org>2021-10-30 22:27:49 +0800
commit45b8e057934b5f565013f29f4f461aaca051a56d (patch)
tree155bcc41bdec06bb7446022af317eab102392c44
parent873f5a979e6245deb8ef9659152e2af034f85ce2 (diff)
downloadafl++-45b8e057934b5f565013f29f4f461aaca051a56d.tar.gz
fix off by one bug of PCGUARD instrumentation
fix bug #1120
-rw-r--r--instrumentation/SanitizerCoverageLTO.so.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc
index d90fa867..7a3d8c4d 100644
--- a/instrumentation/SanitizerCoverageLTO.so.cc
+++ b/instrumentation/SanitizerCoverageLTO.so.cc
@@ -1049,7 +1049,7 @@ bool ModuleSanitizerCoverage::instrumentModule(
 
       uint32_t write_loc = afl_global_id;
 
-      if (afl_global_id % 8) write_loc = (((afl_global_id + 8) >> 3) << 3);
+      write_loc = (((afl_global_id + 8) >> 3) << 3);
 
       GlobalVariable *AFLFinalLoc =
           new GlobalVariable(M, Int32Tyi, true, GlobalValue::ExternalLinkage, 0,