diff options
author | David Carlier <devnexen@gmail.com> | 2020-01-07 16:30:45 +0000 |
---|---|---|
committer | David Carlier <devnexen@gmail.com> | 2020-01-07 16:30:45 +0000 |
commit | c7b4a729a921310bbaafa8ca48a67944dcca9e7b (patch) | |
tree | 1a8c6e70ebe00a6ea0fdfb1920836c5d2a6bebcf /llvm_mode/afl-llvm-pass.so.cc | |
parent | 48171dc4ada1938b7286dee324732325a3f1b6c3 (diff) | |
download | afl++-c7b4a729a921310bbaafa8ca48a67944dcca9e7b.tar.gz |
llvm_mode little update proposal.
avoiding intrinsics generated by LLVM for the isntrumentation.
Diffstat (limited to 'llvm_mode/afl-llvm-pass.so.cc')
-rw-r--r-- | llvm_mode/afl-llvm-pass.so.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm_mode/afl-llvm-pass.so.cc b/llvm_mode/afl-llvm-pass.so.cc index a2753a6b..0b3db4ed 100644 --- a/llvm_mode/afl-llvm-pass.so.cc +++ b/llvm_mode/afl-llvm-pass.so.cc @@ -156,9 +156,14 @@ bool AFLCoverage::runOnModule(Module &M) { /* Instrument all the things! */ + const char *IntrinsicPrefix = "llvm."; int inst_blocks = 0; - for (auto &F : M) + for (auto &F : M) { + + auto Fname = F.getName(); + if (Fname.startswith(IntrinsicPrefix)) continue; + for (auto &BB : F) { BasicBlock::iterator IP = BB.getFirstInsertionPt(); @@ -372,6 +377,7 @@ bool AFLCoverage::runOnModule(Module &M) { inst_blocks++; } + } /* Say something nice. */ |