about summary refs log tree commit diff
path: root/llvm_mode/SanitizerCoverageLTO.so.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-08-20 13:37:34 +0200
committervan Hauser <vh@thc.org>2020-08-20 13:37:34 +0200
commit3cdaf4dcf204d3efb55153daf22c231d445b3e4a (patch)
tree635c0c5c4e6d67288c2135e8b47c9af8e87641e5 /llvm_mode/SanitizerCoverageLTO.so.cc
parentf92607cff121c90416914526271bbf14df26bf29 (diff)
downloadafl++-3cdaf4dcf204d3efb55153daf22c231d445b3e4a.tar.gz
sancov enhancement
Diffstat (limited to 'llvm_mode/SanitizerCoverageLTO.so.cc')
-rw-r--r--llvm_mode/SanitizerCoverageLTO.so.cc4
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 &&