aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-02-24 03:03:53 +0100
committervan Hauser <vh@thc.org>2020-02-24 03:03:53 +0100
commit28b43ab1379c9be9ea80abda160d1582a4cdb348 (patch)
tree0e70f876aa06112735cae5d58aceb0326b1b2044
parentf807d7cefbc3c0e71cac6aad5cc28006f6a253be (diff)
downloadafl++-28b43ab1379c9be9ea80abda160d1582a4cdb348.tar.gz
important InsTrim bugfix!
-rw-r--r--llvm_mode/LLVMInsTrim.so.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm_mode/LLVMInsTrim.so.cc b/llvm_mode/LLVMInsTrim.so.cc
index afe89ec7..390e0697 100644
--- a/llvm_mode/LLVMInsTrim.so.cc
+++ b/llvm_mode/LLVMInsTrim.so.cc
@@ -169,6 +169,7 @@ struct InsTrim : public ModulePass {
ConstantInt *Zero = ConstantInt::get(Int8Ty, 0);
ConstantInt *One = ConstantInt::get(Int8Ty, 1);
+ ConstantInt *One32 = ConstantInt::get(Int32Ty, 1);
u64 total_rs = 0;
u64 total_hs = 0;
@@ -512,7 +513,7 @@ struct InsTrim : public ModulePass {
->setMetadata(M.getMDKindID("nosanitize"), MDNode::get(C, None));
// Bugfix #3: save the actually location ID to OldPrev
- Value *Shr = IRB.CreateLShr(L, One);
+ Value *Shr = IRB.CreateLShr(L, One32);
IRB.CreateStore(Shr, OldPrev)
->setMetadata(M.getMDKindID("nosanitize"), MDNode::get(C, None));