diff options
author | van Hauser <vh@thc.org> | 2020-05-07 14:59:12 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-05-07 14:59:12 +0200 |
commit | ef2ccc8117bb899616472e2d95525ae0ca1a2098 (patch) | |
tree | 3669903ac71840a5989a71695453d78fd2da9a80 /llvm_mode/LLVMInsTrim.so.cc | |
parent | 02887dc1645f3d4114905d22240a062098314e7b (diff) | |
download | afl++-ef2ccc8117bb899616472e2d95525ae0ca1a2098.tar.gz |
added AFL_LLVM_SKIPSINGLEBLOCK and changed default behaviour to instrument single block functions
Diffstat (limited to 'llvm_mode/LLVMInsTrim.so.cc')
-rw-r--r-- | llvm_mode/LLVMInsTrim.so.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm_mode/LLVMInsTrim.so.cc b/llvm_mode/LLVMInsTrim.so.cc index ad046a8b..ed6c79e8 100644 --- a/llvm_mode/LLVMInsTrim.so.cc +++ b/llvm_mode/LLVMInsTrim.so.cc @@ -134,7 +134,8 @@ struct InsTrim : public ModulePass { } - if (getenv("AFL_LLVM_INSTRIM_SKIPSINGLEBLOCK") != NULL) + if (getenv("AFL_LLVM_INSTRIM_SKIPSINGLEBLOCK") || + getenv("AFL_LLVM_SKIPSINGLEBLOCK")) function_minimum_size = 2; unsigned PrevLocSize = 0; @@ -394,7 +395,7 @@ struct InsTrim : public ModulePass { if ((callInst = dyn_cast<CallInst>(&IN))) { Function *Callee = callInst->getCalledFunction(); - if (!Callee || Callee->size() < 2) + if (!Callee || Callee->size() < function_minimum_size) continue; else { |