about summary refs log tree commit diff
path: root/instrumentation/cmplog-instructions-pass.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-12-13 22:58:19 +0100
committerGitHub <noreply@github.com>2021-12-13 22:58:19 +0100
commit22e2362f0fd5685548696f487639104a0059e3eb (patch)
treef59a3c6d5fb0f42056252f400f3bab1e1010432b /instrumentation/cmplog-instructions-pass.cc
parent08ca4d54a55fe73e64a994c41a12af61f52e497e (diff)
parentc6bad07d75aa36671ebc32a722566cb145414b08 (diff)
downloadafl++-22e2362f0fd5685548696f487639104a0059e3eb.tar.gz
Merge pull request #1213 from AFLplusplus/dev
push to stable
Diffstat (limited to 'instrumentation/cmplog-instructions-pass.cc')
-rw-r--r--instrumentation/cmplog-instructions-pass.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/instrumentation/cmplog-instructions-pass.cc b/instrumentation/cmplog-instructions-pass.cc
index 07f80b2c..054caee2 100644
--- a/instrumentation/cmplog-instructions-pass.cc
+++ b/instrumentation/cmplog-instructions-pass.cc
@@ -264,7 +264,11 @@ bool CmpLogInstructions::hookInstrs(Module &M) {
 
       IRBuilder<> IRB2(selectcmpInst->getParent());
       IRB2.SetInsertPoint(selectcmpInst);
-      LoadInst *CmpPtr = IRB2.CreateLoad(AFLCmplogPtr);
+      LoadInst *CmpPtr = IRB2.CreateLoad(
+#if LLVM_VERSION_MAJOR >= 14
+          PointerType::get(Int8Ty, 0),
+#endif
+          AFLCmplogPtr);
       CmpPtr->setMetadata(M.getMDKindID("nosanitize"), MDNode::get(C, None));
       auto is_not_null = IRB2.CreateICmpNE(CmpPtr, Null);
       auto ThenTerm =