fix cmplog for llvm 11-dev

This commit is contained in:
van Hauser
2020-05-22 11:42:04 +02:00
parent 5b9dfa0600
commit a5ef93c83a
3 changed files with 7 additions and 5 deletions

View File

@ -892,7 +892,7 @@ static int area_is_mapped(void *ptr, size_t len) {
}
void __cmplog_rtn_hook(void *ptr1, void *ptr2) {
void __cmplog_rtn_hook(u8 *ptr1, u8 *ptr2) {
if (!__afl_cmp_map) return;

View File

@ -93,16 +93,17 @@ bool CmpLogRoutines::hookRtns(Module &M) {
std::vector<CallInst *> calls;
LLVMContext & C = M.getContext();
Type * VoidTy = Type::getVoidTy(C);
PointerType *VoidPtrTy = PointerType::get(VoidTy, 0);
Type *VoidTy = Type::getVoidTy(C);
// PointerType *VoidPtrTy = PointerType::get(VoidTy, 0);
IntegerType *Int8Ty = IntegerType::getInt8Ty(C);
PointerType *i8PtrTy = PointerType::get(Int8Ty, 0);
#if LLVM_VERSION_MAJOR < 9
Constant *
#else
FunctionCallee
#endif
c = M.getOrInsertFunction("__cmplog_rtn_hook", VoidTy, VoidPtrTy,
VoidPtrTy
c = M.getOrInsertFunction("__cmplog_rtn_hook", VoidTy, i8PtrTy, i8PtrTy
#if LLVM_VERSION_MAJOR < 5
,
NULL