diff options
author | van Hauser <vh@thc.org> | 2020-05-22 11:42:04 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-05-22 11:42:04 +0200 |
commit | a5ef93c83a958b5df1ee1c602c687122648aadb6 (patch) | |
tree | 2fe01f9eea23674ad1e0f09165335b32bf00022e /llvm_mode | |
parent | 5b9dfa060061b9626cda7acebbae766eb1fbba29 (diff) | |
download | afl++-a5ef93c83a958b5df1ee1c602c687122648aadb6.tar.gz |
fix cmplog for llvm 11-dev
Diffstat (limited to 'llvm_mode')
-rw-r--r-- | llvm_mode/afl-llvm-rt.o.c | 2 | ||||
-rw-r--r-- | llvm_mode/cmplog-routines-pass.cc | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/llvm_mode/afl-llvm-rt.o.c b/llvm_mode/afl-llvm-rt.o.c index c0d1569d..0583cb5f 100644 --- a/llvm_mode/afl-llvm-rt.o.c +++ b/llvm_mode/afl-llvm-rt.o.c @@ -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; diff --git a/llvm_mode/cmplog-routines-pass.cc b/llvm_mode/cmplog-routines-pass.cc index bb78273a..623388ba 100644 --- a/llvm_mode/cmplog-routines-pass.cc +++ b/llvm_mode/cmplog-routines-pass.cc @@ -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 |