diff options
author | van Hauser <vh@thc.org> | 2020-08-20 13:37:34 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-08-20 13:37:34 +0200 |
commit | 3cdaf4dcf204d3efb55153daf22c231d445b3e4a (patch) | |
tree | 635c0c5c4e6d67288c2135e8b47c9af8e87641e5 /llvm_mode/SanitizerCoverageLTO.so.cc | |
parent | f92607cff121c90416914526271bbf14df26bf29 (diff) | |
download | afl++-3cdaf4dcf204d3efb55153daf22c231d445b3e4a.tar.gz |
sancov enhancement
Diffstat (limited to 'llvm_mode/SanitizerCoverageLTO.so.cc')
-rw-r--r-- | llvm_mode/SanitizerCoverageLTO.so.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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 && |