mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-12 10:08:07 +00:00
fix
This commit is contained in:
@ -482,8 +482,7 @@ bool CmpLogRoutines::hookRtns(Module &M) {
|
|||||||
|
|
||||||
for (auto &callInst : Strcmp) {
|
for (auto &callInst : Strcmp) {
|
||||||
|
|
||||||
Value *v1P = callInst->getArgOperand(0), *v2P = callInst->getArgOperand(1),
|
Value *v1P = callInst->getArgOperand(0), *v2P = callInst->getArgOperand(1);
|
||||||
*v3P = callInst->getArgOperand(2);
|
|
||||||
|
|
||||||
IRBuilder<> IRB2(callInst->getParent());
|
IRBuilder<> IRB2(callInst->getParent());
|
||||||
IRB2.SetInsertPoint(callInst);
|
IRB2.SetInsertPoint(callInst);
|
||||||
@ -498,10 +497,8 @@ bool CmpLogRoutines::hookRtns(Module &M) {
|
|||||||
std::vector<Value *> args;
|
std::vector<Value *> args;
|
||||||
Value * v1Pcasted = IRB.CreatePointerCast(v1P, i8PtrTy);
|
Value * v1Pcasted = IRB.CreatePointerCast(v1P, i8PtrTy);
|
||||||
Value * v2Pcasted = IRB.CreatePointerCast(v2P, i8PtrTy);
|
Value * v2Pcasted = IRB.CreatePointerCast(v2P, i8PtrTy);
|
||||||
Value * v3Pcasted = IRB.CreateZExtOrBitCast(v3P, Int32Ty);
|
|
||||||
args.push_back(v1Pcasted);
|
args.push_back(v1Pcasted);
|
||||||
args.push_back(v2Pcasted);
|
args.push_back(v2Pcasted);
|
||||||
args.push_back(v3Pcasted);
|
|
||||||
|
|
||||||
IRB.CreateCall(cmplogHookFnStr, args);
|
IRB.CreateCall(cmplogHookFnStr, args);
|
||||||
|
|
||||||
@ -527,7 +524,7 @@ bool CmpLogRoutines::hookRtns(Module &M) {
|
|||||||
std::vector<Value *> args;
|
std::vector<Value *> args;
|
||||||
Value * v1Pcasted = IRB.CreatePointerCast(v1P, i8PtrTy);
|
Value * v1Pcasted = IRB.CreatePointerCast(v1P, i8PtrTy);
|
||||||
Value * v2Pcasted = IRB.CreatePointerCast(v2P, i8PtrTy);
|
Value * v2Pcasted = IRB.CreatePointerCast(v2P, i8PtrTy);
|
||||||
Value * v3Pcasted = IRB.CreateZExtOrBitCast(v3P, Int32Ty);
|
Value * v3Pcasted = IRB.CreateTruncOrBitCast(v3P, Int32Ty);
|
||||||
args.push_back(v1Pcasted);
|
args.push_back(v1Pcasted);
|
||||||
args.push_back(v2Pcasted);
|
args.push_back(v2Pcasted);
|
||||||
args.push_back(v3Pcasted);
|
args.push_back(v3Pcasted);
|
||||||
|
Reference in New Issue
Block a user