diff options
author | hexcoder <hexcoder-@users.noreply.github.com> | 2020-01-08 10:19:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-08 10:19:08 +0100 |
commit | 553d9f5cfc6a9adc1a0a89bab477cb02ff174e58 (patch) | |
tree | f3bc71c8dfc4d9a96e8134d8c361efeb8fc52044 | |
parent | 1b1e63046181d413640514ff744b2f6f06c0796f (diff) | |
parent | c7b4a729a921310bbaafa8ca48a67944dcca9e7b (diff) | |
download | afl++-553d9f5cfc6a9adc1a0a89bab477cb02ff174e58.tar.gz |
Merge pull request #166 from devnexen/llvm_mode_avoid_instrinsics
llvm_mode little update proposal (avoid instrumenting llvm intrinsic functions).
-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. */ |