about summary refs log tree commit diff
path: root/llvm_mode/SanitizerCoverageLTO.so.cc
diff options
context:
space:
mode:
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 &&