diff options
author | van Hauser <vh@thc.org> | 2022-01-20 16:17:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 16:17:08 +0100 |
commit | 7aced239e8a0855d87ecc921ba5691b29202ec1e (patch) | |
tree | a8e877a149495ea4ec48723d8af57426f8322a3a /instrumentation/afl-llvm-pass.so.cc | |
parent | 9242e0db8ac8a0e82d78432af389108e74700f00 (diff) | |
parent | d1de12d6175cd84357eadbf204e15b184b22ae42 (diff) | |
download | afl++-7aced239e8a0855d87ecc921ba5691b29202ec1e.tar.gz |
Merge pull request #1294 from AFLplusplus/dev
Push to stable
Diffstat (limited to 'instrumentation/afl-llvm-pass.so.cc')
-rw-r--r-- | instrumentation/afl-llvm-pass.so.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/instrumentation/afl-llvm-pass.so.cc b/instrumentation/afl-llvm-pass.so.cc index 899734f8..5246ba08 100644 --- a/instrumentation/afl-llvm-pass.so.cc +++ b/instrumentation/afl-llvm-pass.so.cc @@ -631,18 +631,23 @@ bool AFLCoverage::runOnModule(Module &M) { LoadInst *PrevLoc; if (ngram_size) { + PrevLoc = IRB.CreateLoad( #if LLVM_VERSION_MAJOR >= 14 - PrevLocTy, + PrevLocTy, #endif - AFLPrevLoc); + AFLPrevLoc); + } else { + PrevLoc = IRB.CreateLoad( #if LLVM_VERSION_MAJOR >= 14 - IRB.getInt32Ty(), + IRB.getInt32Ty(), #endif - AFLPrevLoc); + AFLPrevLoc); + } + PrevLoc->setMetadata(M.getMDKindID("nosanitize"), MDNode::get(C, None)); Value *PrevLocTrans; |