diff --git a/docs/Changelog.md b/docs/Changelog.md index e8b95604e368786a1d67dd0ce408de7e988c2ad7..c488b84ed66d96686c08d48705e1f9ed1ae3d6b2 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -22,6 +22,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>. - changed execs_per_sec in fuzzer_stats from "current" execs per second (which is pointless) to total execs per second - bugfix for dictionary insert stage count (fix via Google repo PR) + - llvm_mode InsTrim: no pointless instrumentation of 1 block functions - afl-clang-fast: - show in the help output for which llvm version it was compiled for - now does not need to be recompiled between trace-pc and pass diff --git a/llvm_mode/LLVMInsTrim.so.cc b/llvm_mode/LLVMInsTrim.so.cc index 995a72173a2dcc5ad573a69290c9f0075f71e847..08d3f68f88acb974f62031f32ebdbbdd732db701 100644 --- a/llvm_mode/LLVMInsTrim.so.cc +++ b/llvm_mode/LLVMInsTrim.so.cc @@ -175,7 +175,8 @@ struct InsTrim : public ModulePass { for (Function &F : M) { - if (!F.size()) { continue; } + // if it is external or only contains one basic block: skip it + if (F.size() < 2) { continue; } if (!myWhitelist.empty()) {