sancov enhancement
MODIFY
llvm_mode/LLVMInsTrim.so.cc
llvm_mode/LLVMInsTrim.so.cc
@@ -181,10 +181,16 @@ struct InsTrim : public ModulePass {
#ifdef AFL_HAVE_VECTOR_INTRINSICS
// IntegerType *Int64Ty = IntegerType::getInt64Ty(C);
- uint64_t PrevLocVecSize = PowerOf2Ceil(PrevLocSize);
+ int PrevLocVecSize = PowerOf2Ceil(PrevLocSize);
IntegerType *IntLocTy =
IntegerType::getIntNTy(C, sizeof(PREV_LOC_T) * CHAR_BIT);
- if (ngram_size) PrevLocTy = VectorType::get(IntLocTy, PrevLocVecSize);
+ if (ngram_size)
+ PrevLocTy = VectorType::get(IntLocTy, PrevLocVecSize
+ #if LLVM_VERSION_MAJOR >= 12
+ ,
+ false
+ #endif
+ );
#endif
/* Get globals for the SHM region and the previous location. Note that

MODIFY
llvm_mode/SanitizerCoverageLTO.so.cc
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 &&

MODIFY
llvm_mode/afl-llvm-pass.so.cc
llvm_mode/afl-llvm-pass.so.cc
@@ -225,8 +225,14 @@ bool AFLCoverage::runOnModule(Module &M) {
PrevLocSize = 1;
#ifdef AFL_HAVE_VECTOR_INTRINSICS
- uint64_t PrevLocVecSize = PowerOf2Ceil(PrevLocSize);
- if (ngram_size) PrevLocTy = VectorType::get(IntLocTy, PrevLocVecSize);
+ int PrevLocVecSize = PowerOf2Ceil(PrevLocSize);
+ if (ngram_size)
+ PrevLocTy = VectorType::get(IntLocTy, PrevLocVecSize
+ #if LLVM_VERSION_MAJOR >= 12
+ ,
+ false
+ #endif
+ );
#endif
/* Get globals for the SHM region and the previous location. Note that

sancov enhancement