From 3cdaf4dcf204d3efb55153daf22c231d445b3e4a Mon Sep 17 00:00:00 2001 From: van Hauser Date: Thu, 20 Aug 2020 13:37:34 +0200 Subject: sancov enhancement --- llvm_mode/SanitizerCoverageLTO.so.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm_mode/SanitizerCoverageLTO.so.cc') diff --git a/llvm_mode/SanitizerCoverageLTO.so.cc b/llvm_mode/SanitizerCoverageLTO.so.cc index 5f38e1df..b3518882 100644 --- a/llvm_mode/SanitizerCoverageLTO.so.cc +++ b/llvm_mode/SanitizerCoverageLTO.so.cc @@ -1047,6 +1047,10 @@ static bool shouldInstrumentBlock(const Function &F, const BasicBlock *BB, // (catchswitch blocks). if (BB->getFirstInsertionPt() == BB->end()) return false; + // Special afl++ + if (!Options.NoPrune && &F.getEntryBlock() == BB && &F.size() > 1) + return false; + if (Options.NoPrune || &F.getEntryBlock() == BB) return true; if (Options.CoverageType == SanitizerCoverageOptions::SCK_Function && -- cgit 1.4.1