From 4cccdb89c0112931e451bc0719880813d15d14dc Mon Sep 17 00:00:00 2001 From: van Hauser Date: Sun, 16 Feb 2020 16:45:30 +0100 Subject: fix for instrim (not the important one) --- docs/Changelog.md | 1 + llvm_mode/LLVMInsTrim.so.cc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index e8b95604..c488b84e 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -22,6 +22,7 @@ sending a mail to . - 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 995a7217..08d3f68f 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()) { -- cgit 1.4.1