diff options
-rw-r--r-- | docs/ChangeLog | 2 | ||||
-rw-r--r-- | llvm_mode/Makefile | 6 | ||||
-rw-r--r-- | llvm_mode/README.llvm | 3 | ||||
-rw-r--r-- | llvm_mode/compare-transform-pass.so.cc | 8 |
4 files changed, 13 insertions, 6 deletions
diff --git a/docs/ChangeLog b/docs/ChangeLog index 28042a47..e1d66767 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -27,7 +27,7 @@ Version ++2.52c (2019-05-28): to the AFL schedule, not to the FAST schedule. So nothing changes unless you use the new -p option :-) - see docs/power_schedules.txt - added afl-system-config script to set all system performance options for fuzzing - - llvm_mode works with llvm 3.9 up to including 6.0.1 + - llvm_mode works with llvm 3.9 up to including 8 ! - qemu_mode got upgraded from 2.1 to 3.1 - incorporated from https://github.com/andreafioraldi/afl and with community patches added diff --git a/llvm_mode/Makefile b/llvm_mode/Makefile index 8577ad97..441f8877 100644 --- a/llvm_mode/Makefile +++ b/llvm_mode/Makefile @@ -24,16 +24,16 @@ VERSION = $(shell grep '^\#define VERSION ' ../config.h | cut -d '"' -f2) LLVM_CONFIG ?= llvm-config #LLVM_OK = $(shell $(LLVM_CONFIG) --version | egrep -q '^[5-6]' && echo 0 || echo 1 ) -LLVM_UNSUPPORTED = $(shell $(LLVM_CONFIG) --version | egrep -q '^[3].0' && echo 1 || echo 0 ) +LLVM_UNSUPPORTED = $(shell $(LLVM_CONFIG) --version | egrep -q '^9|3.0' && echo 1 || echo 0 ) ifeq "$(LLVM_UNSUPPORTED)" "1" - $(error llvm_mode only supports llvm versions 3.8.0 and higher ) + $(warn llvm_mode only supports versions 3.8.0 up to 8.x ) endif CFLAGS ?= -O3 -funroll-loops CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign \ -DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \ - -DVERSION=\"$(VERSION)\" + -DVERSION=\"$(VERSION)\" ifdef AFL_TRACE_PC CFLAGS += -DUSE_TRACE_PC=1 endif diff --git a/llvm_mode/README.llvm b/llvm_mode/README.llvm index 63532d9c..dc860e97 100644 --- a/llvm_mode/README.llvm +++ b/llvm_mode/README.llvm @@ -7,7 +7,8 @@ Fast LLVM-based instrumentation for afl-fuzz 1) Introduction --------------- -!!! This works with LLVM from version 3.8.1 up to version 8 !!! +! llvm_mode works with llvm version 3.8.1 up to 8.x ! +! llvm version 9 does not work yet ! The code in this directory allows you to instrument programs for AFL using true compiler-level instrumentation, instead of the more crude diff --git a/llvm_mode/compare-transform-pass.so.cc b/llvm_mode/compare-transform-pass.so.cc index 7222ea27..54d33e18 100644 --- a/llvm_mode/compare-transform-pass.so.cc +++ b/llvm_mode/compare-transform-pass.so.cc @@ -69,7 +69,13 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp, const IntegerType *Int8Ty = IntegerType::getInt8Ty(C); IntegerType *Int32Ty = IntegerType::getInt32Ty(C); IntegerType *Int64Ty = IntegerType::getInt64Ty(C); - Constant* c = M.getOrInsertFunction("tolower", + +#if LLVM_VERSION_MAJOR < 9 + Constant* +#else + FunctionCallee +#endif + c = M.getOrInsertFunction("tolower", Int32Ty, Int32Ty #if LLVM_VERSION_MAJOR < 5 |