diff options
author | van Hauser <vh@thc.org> | 2020-05-29 14:35:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-29 14:35:05 +0200 |
commit | 710dda522186310a7fb4e3b6a05cae0b28fa619e (patch) | |
tree | f96fcfe756fe5e6e0dde11be8df8b3df9f654952 /llvm_mode/afl-llvm-lto-instrumentation.so.cc | |
parent | 6892018142cc21ba9a0744c0757d39f21e9b66bc (diff) | |
parent | c3b864d8d4dfaf148158a689df0c5ddf4bcc1f32 (diff) | |
download | afl++-710dda522186310a7fb4e3b6a05cae0b28fa619e.tar.gz |
Merge pull request #374 from AFLplusplus/dev
Dev
Diffstat (limited to 'llvm_mode/afl-llvm-lto-instrumentation.so.cc')
-rw-r--r-- | llvm_mode/afl-llvm-lto-instrumentation.so.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm_mode/afl-llvm-lto-instrumentation.so.cc b/llvm_mode/afl-llvm-lto-instrumentation.so.cc index f44b336e..cbe68171 100644 --- a/llvm_mode/afl-llvm-lto-instrumentation.so.cc +++ b/llvm_mode/afl-llvm-lto-instrumentation.so.cc @@ -197,6 +197,17 @@ bool AFLLTOPass::runOnModule(Module &M) { if (F.size() < function_minimum_size) continue; if (isBlacklisted(&F)) continue; + // whitelist check + AttributeList Attrs = F.getAttributes(); + if (Attrs.hasAttribute(-1, StringRef("skipinstrument"))) { + + if (debug) + fprintf(stderr, "DEBUG: Function %s is not whitelisted\n", + F.getName().str().c_str()); + continue; + + } + std::vector<BasicBlock *> InsBlocks; if (autodictionary) { |