diff options
author | hexcoder- <heiko@hexco.de> | 2020-05-09 19:08:54 +0200 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-05-09 19:08:54 +0200 |
commit | 102067d43d7476997b2ffd6faceae4510f753d89 (patch) | |
tree | 323ccb922055602807df8aeaad7068c05f68a668 | |
parent | 041f19494ea183ed1abc24eb782a34fb7c3116fe (diff) | |
download | afl++-102067d43d7476997b2ffd6faceae4510f753d89.tar.gz |
LLVMInsTrim.so.cc: fix for LLVM 3.8.0
-rw-r--r-- | llvm_mode/LLVMInsTrim.so.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm_mode/LLVMInsTrim.so.cc b/llvm_mode/LLVMInsTrim.so.cc index ed6c79e8..41d4397b 100644 --- a/llvm_mode/LLVMInsTrim.so.cc +++ b/llvm_mode/LLVMInsTrim.so.cc @@ -103,7 +103,6 @@ struct InsTrim : public ModulePass { bool runOnModule(Module &M) override { char be_quiet = 0; - int ngram_size = 0; if ((isatty(2) && !getenv("AFL_QUIET")) || getenv("AFL_DEBUG") != NULL) { @@ -144,6 +143,7 @@ struct InsTrim : public ModulePass { char *ctx_str = getenv("AFL_LLVM_CTX"); #ifdef AFL_HAVE_VECTOR_INTRINSICS + int ngram_size = 0; /* Decide previous location vector size (must be a power of two) */ VectorType *PrevLocTy; @@ -341,6 +341,7 @@ struct InsTrim : public ModulePass { if (MS.find(&BB) == MS.end()) { continue; } IRBuilder<> IRB(&*BB.getFirstInsertionPt()); +#ifdef AFL_HAVE_VECTOR_INTRINSICS if (ngram_size) { LoadInst *PrevLoc = IRB.CreateLoad(AFLPrevLoc); @@ -357,7 +358,9 @@ struct InsTrim : public ModulePass { ->setMetadata(M.getMDKindID("nosanitize"), MDNode::get(C, None)); - } else { + } else +#endif + { IRB.CreateStore(ConstantInt::get(Int32Ty, genLabel()), AFLPrevLoc); |