aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2021-04-30 12:09:06 +0200
committerhexcoder- <heiko@hexco.de>2021-04-30 12:09:06 +0200
commitb15fcde477d4c1d59265c717841b5942143917ee (patch)
tree21b5162d3e674444cd1db2586dcd9067dcb5abc4
parent976969dce56cb7d8349706962eb774a0ab0a0931 (diff)
downloadafl++-b15fcde477d4c1d59265c717841b5942143917ee.tar.gz
still not working
-rw-r--r--instrumentation/afl-llvm-pass.so.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/instrumentation/afl-llvm-pass.so.cc b/instrumentation/afl-llvm-pass.so.cc
index 6c898c48..27b53e68 100644
--- a/instrumentation/afl-llvm-pass.so.cc
+++ b/instrumentation/afl-llvm-pass.so.cc
@@ -409,12 +409,9 @@ bool AFLCoverage::runOnModule(Module &M) {
if (F.size() < function_minimum_size) continue;
- unsigned extra_increment_BB = 0;
for (auto &BB : F) {
- if (extra_increment_BB) {
- // increment BB
- --extra_increment_BB;
+ if (BB.getName() == "injected") {
continue;
}
BasicBlock::iterator IP = BB.getFirstInsertionPt();
@@ -662,8 +659,8 @@ bool AFLCoverage::runOnModule(Module &M) {
// the calculation may need to repeat, if atomic compare_exchange is not successful
BasicBlock::iterator it(*Counter); it++;
BasicBlock * end_bb = BB.splitBasicBlock(it);
+ end_bb->setName("injected");
- extra_increment_BB = 2;
// insert the block before the second half of the split
BasicBlock * do_while_bb = BasicBlock::Create(C, "injected", end_bb->getParent(), end_bb);