diff --git a/Makefile b/Makefile index 4e8772e7..ee5bde55 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ # PROGNAME = afl -VERSION = 2.15b +VERSION = $(shell grep '^\#define VERSION ' config.h | cut -d '"' -f2) PREFIX ?= /usr/local BIN_PATH = $(PREFIX)/bin @@ -30,7 +30,7 @@ SH_PROGS = afl-plot afl-cmin afl-whatsup CFLAGS ?= -O3 -funroll-loops CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign \ -DAFL_PATH=\"$(HELPER_PATH)\" -DDOC_PATH=\"$(DOC_PATH)\" \ - -DBIN_PATH=\"$(BIN_PATH)\" -DVERSION=\"$(VERSION)\" + -DBIN_PATH=\"$(BIN_PATH)\" ifneq "$(filter Linux GNU%,$(shell uname))" "" LDFLAGS += -ldl @@ -66,7 +66,7 @@ afl-gcc: afl-gcc.c $(COMM_HDR) | test_x86 set -e; for i in afl-g++ afl-clang afl-clang++; do ln -sf afl-gcc $$i; done afl-as: afl-as.c afl-as.h $(COMM_HDR) | test_x86 - $(CC) $(CFLAGS) $@.c -o $@ $(LDFLAGS) + $(CC) $(CFLAGS) $@.c -o $@ $(LDFLAGS) ln -sf afl-as as afl-fuzz: afl-fuzz.c $(COMM_HDR) | test_x86 @@ -132,7 +132,7 @@ install: all publish: clean test "`basename $$PWD`" = "afl" || exit 1 - test -f ~/www/afl/releases/$(PROGNAME)-$(VERSION).tgz; if [ "$$?" = "0" ]; then echo; echo "Change program version in Makefile, mmkay?"; echo; exit 1; fi + test -f ~/www/afl/releases/$(PROGNAME)-$(VERSION).tgz; if [ "$$?" = "0" ]; then echo; echo "Change program version in config.h, mmkay?"; echo; exit 1; fi cd ..; rm -rf $(PROGNAME)-$(VERSION); cp -pr $(PROGNAME) $(PROGNAME)-$(VERSION); \ tar -cvz -f ~/www/afl/releases/$(PROGNAME)-$(VERSION).tgz $(PROGNAME)-$(VERSION) chmod 644 ~/www/afl/releases/$(PROGNAME)-$(VERSION).tgz diff --git a/afl-as.h b/afl-as.h index 1cca7986..9c6e5032 100644 --- a/afl-as.h +++ b/afl-as.h @@ -181,7 +181,9 @@ static const u8* main_payload_32 = " xorl %ecx, %edi\n" " shrl $1, %ecx\n" " movl %ecx, __afl_prev_loc\n" -#endif /* !COVERAGE_ONLY */ +#else + " movl %ecx, %edi\n" +#endif /* ^!COVERAGE_ONLY */ "\n" #ifdef SKIP_COUNTS " orb $1, (%edx, %edi, 1)\n" diff --git a/config.h b/config.h index 036bb6c7..99d3c2f7 100644 --- a/config.h +++ b/config.h @@ -19,6 +19,10 @@ #include "types.h" +/* Version string: */ + +#define VERSION "2.16b" + /****************************************************** * * * Settings that may be of interest to power users: * diff --git a/docs/ChangeLog b/docs/ChangeLog index 40598c13..17d8e59d 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -16,6 +16,16 @@ Not sure if you should upgrade? The lowest currently recommended version is 2.07b. If you're stuck on an earlier release, it's strongly advisable to get on with the times. +-------------- +Version 2.16b: +-------------- + + - Improved support for older versions of clang (hopefully without + breaking anything). + + - Moved version data from Makefile to config.h. Suggested by + Jonathan Metzman. + -------------- Version 2.15b: -------------- diff --git a/docs/README b/docs/README index 698350df..27068208 100644 --- a/docs/README +++ b/docs/README @@ -340,8 +340,8 @@ near the end of technical_details.txt. ------------------------ Fuzzing is a wonderful and underutilized technique for discovering non-crashing -design and implementation errors, too. Plenty of interesting bugs have been -found by modifying the target programs to call abort() when: +design and implementation errors, too. Quite a few interesting bugs have been +found by modifying the target programs to call abort() when, say: - Two bignum libraries produce different outputs when given the same fuzzer-generated input, @@ -349,6 +349,9 @@ found by modifying the target programs to call abort() when: - An image library produces different outputs when asked to decode the same input image several times in a row, + - A serialization / deserialization library fails to produce stable outputs + when iteratively serializing and deserializing fuzzer-supplied data, + - A compression library produces an output inconsistent with the input file when asked to compress and then decompress a particular blob. diff --git a/llvm_mode/Makefile b/llvm_mode/Makefile index 46b36784..5d4da94d 100644 --- a/llvm_mode/Makefile +++ b/llvm_mode/Makefile @@ -20,7 +20,7 @@ PREFIX ?= /usr/local HELPER_PATH = $(PREFIX)/lib/afl BIN_PATH = $(PREFIX)/bin -VERSION = $(shell grep ^VERSION ../Makefile | cut -d= -f2 | sed 's/ //') +VERSION = $(shell grep '^\#define VERSION ' ../config.h | cut -d '"' -f2) LLVM_CONFIG ?= llvm-config diff --git a/llvm_mode/afl-llvm-pass.so.cc b/llvm_mode/afl-llvm-pass.so.cc index 84dcb84a..422cbad6 100644 --- a/llvm_mode/afl-llvm-pass.so.cc +++ b/llvm_mode/afl-llvm-pass.so.cc @@ -100,7 +100,7 @@ bool AFLCoverage::runOnModule(Module &M) { GlobalVariable *AFLPrevLoc = new GlobalVariable( M, Int32Ty, false, GlobalValue::ExternalLinkage, 0, "__afl_prev_loc", - 0, GlobalValue::GeneralDynamicTLSModel, 0, false); + 0, GlobalVariable::GeneralDynamicTLSModel, 0, false); /* Instrument all the things! */