diff options
author | vanhauser-thc <vh@thc.org> | 2023-11-28 10:26:37 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2023-11-28 10:26:37 +0100 |
commit | 74f8ca6b468b6d89e8d588e3835486be48184893 (patch) | |
tree | a3b43e791297bd5b7daa517a4166926801a410f1 /instrumentation/cmplog-instructions-pass.cc | |
parent | dd9a04c901c79fe2f3f078de6cc0777e3a5d96df (diff) | |
download | afl++-74f8ca6b468b6d89e8d588e3835486be48184893.tar.gz |
improve cmplog
Diffstat (limited to 'instrumentation/cmplog-instructions-pass.cc')
-rw-r--r-- | instrumentation/cmplog-instructions-pass.cc | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/instrumentation/cmplog-instructions-pass.cc b/instrumentation/cmplog-instructions-pass.cc index 9cd1dc59..8be8c294 100644 --- a/instrumentation/cmplog-instructions-pass.cc +++ b/instrumentation/cmplog-instructions-pass.cc @@ -165,23 +165,25 @@ bool CmpLogInstructions::hookInstrs(Module &M) { IntegerType *Int64Ty = IntegerType::getInt64Ty(C); IntegerType *Int128Ty = IntegerType::getInt128Ty(C); -#if LLVM_VERSION_MAJOR >= 9 - FunctionCallee -#else - Constant * -#endif - c1 = M.getOrInsertFunction("__cmplog_ins_hook1", VoidTy, Int8Ty, Int8Ty, - Int8Ty -#if LLVM_VERSION_MAJOR < 5 - , - NULL -#endif - ); -#if LLVM_VERSION_MAJOR >= 9 - FunctionCallee cmplogHookIns1 = c1; -#else - Function *cmplogHookIns1 = cast<Function>(c1); -#endif + /* + #if LLVM_VERSION_MAJOR >= 9 + FunctionCallee + #else + Constant * + #endif + c1 = M.getOrInsertFunction("__cmplog_ins_hook1", VoidTy, Int8Ty, Int8Ty, + Int8Ty + #if LLVM_VERSION_MAJOR < 5 + , + NULL + #endif + ); + #if LLVM_VERSION_MAJOR >= 9 + FunctionCallee cmplogHookIns1 = c1; + #else + Function *cmplogHookIns1 = cast<Function>(c1); + #endif + */ #if LLVM_VERSION_MAJOR >= 9 FunctionCallee @@ -619,7 +621,7 @@ bool CmpLogInstructions::hookInstrs(Module &M) { switch (cast_size) { case 8: - IRB.CreateCall(cmplogHookIns1, args); + // IRB.CreateCall(cmplogHookIns1, args); break; case 16: IRB.CreateCall(cmplogHookIns2, args); |