This commit is contained in:
Hexcoder
2019-06-03 23:41:42 +02:00
4 changed files with 13 additions and 6 deletions

View File

@ -27,7 +27,7 @@ Version ++2.52c (2019-05-28):
to the AFL schedule, not to the FAST schedule. So nothing changes unless to the AFL schedule, not to the FAST schedule. So nothing changes unless
you use the new -p option :-) - see docs/power_schedules.txt you use the new -p option :-) - see docs/power_schedules.txt
- added afl-system-config script to set all system performance options for fuzzing - 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 - qemu_mode got upgraded from 2.1 to 3.1 - incorporated from
https://github.com/andreafioraldi/afl and with community patches added https://github.com/andreafioraldi/afl and with community patches added

View File

@ -24,16 +24,16 @@ VERSION = $(shell grep '^\#define VERSION ' ../config.h | cut -d '"' -f2)
LLVM_CONFIG ?= llvm-config LLVM_CONFIG ?= llvm-config
#LLVM_OK = $(shell $(LLVM_CONFIG) --version | egrep -q '^[5-6]' && echo 0 || echo 1 ) #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" 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 endif
CFLAGS ?= -O3 -funroll-loops CFLAGS ?= -O3 -funroll-loops
CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign \ CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign \
-DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \ -DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \
-DVERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
ifdef AFL_TRACE_PC ifdef AFL_TRACE_PC
CFLAGS += -DUSE_TRACE_PC=1 CFLAGS += -DUSE_TRACE_PC=1
endif endif

View File

@ -7,7 +7,8 @@ Fast LLVM-based instrumentation for afl-fuzz
1) Introduction 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 The code in this directory allows you to instrument programs for AFL using
true compiler-level instrumentation, instead of the more crude true compiler-level instrumentation, instead of the more crude

View File

@ -69,7 +69,13 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp, const
IntegerType *Int8Ty = IntegerType::getInt8Ty(C); IntegerType *Int8Ty = IntegerType::getInt8Ty(C);
IntegerType *Int32Ty = IntegerType::getInt32Ty(C); IntegerType *Int32Ty = IntegerType::getInt32Ty(C);
IntegerType *Int64Ty = IntegerType::getInt64Ty(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,
Int32Ty Int32Ty
#if LLVM_VERSION_MAJOR < 5 #if LLVM_VERSION_MAJOR < 5