mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-12 18:18:07 +00:00
stronger afl-fuzz performance compilation
This commit is contained in:
22
Makefile
22
Makefile
@ -32,9 +32,25 @@ PROGS = afl-gcc afl-fuzz afl-showmap afl-tmin afl-gotcpu afl-analyze
|
|||||||
SH_PROGS = afl-plot afl-cmin afl-whatsup afl-system-config
|
SH_PROGS = afl-plot afl-cmin afl-whatsup afl-system-config
|
||||||
MANPAGES=$(foreach p, $(PROGS) $(SH_PROGS), $(p).8)
|
MANPAGES=$(foreach p, $(PROGS) $(SH_PROGS), $(p).8)
|
||||||
|
|
||||||
CFLAGS ?= -O3 -funroll-loops
|
ifeq "$(shell echo 'int main() {return 0; }' | $(CC) -x c - -march=native -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1"
|
||||||
CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -I include/ \
|
CFLAGS_PERFORMANCE += -march=native
|
||||||
-DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \
|
endif
|
||||||
|
|
||||||
|
ifeq "$(shell echo 'int main() {return 0; }' | $(CC) -x c - -flto=full -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1"
|
||||||
|
CFLAGS_PERFORMANCE += -flto=full
|
||||||
|
else
|
||||||
|
ifeq "$(shell echo 'int main() {return 0; }' | $(CC) -x c - -flto=thin -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1"
|
||||||
|
CFLAGS_PERFORMANCE += -flto=thin
|
||||||
|
else
|
||||||
|
ifeq "$(shell echo 'int main() {return 0; }' | $(CC) -x c - -flto -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1"
|
||||||
|
CFLAGS_PERFORMANCE += -flto
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
CFLAGS ?= -funroll-loops -Ofast $(CFLAGS_PERFORMANCE)
|
||||||
|
CFLAGS += -Wall -g -Wno-pointer-sign -I include/ \
|
||||||
|
-DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \
|
||||||
-DDOC_PATH=\"$(DOC_PATH)\" -Wno-unused-function
|
-DDOC_PATH=\"$(DOC_PATH)\" -Wno-unused-function
|
||||||
|
|
||||||
AFL_FUZZ_FILES = $(wildcard src/afl-fuzz*.c)
|
AFL_FUZZ_FILES = $(wildcard src/afl-fuzz*.c)
|
||||||
|
@ -19,6 +19,7 @@ Version ++2.60d (develop):
|
|||||||
|
|
||||||
- afl-fuzz:
|
- afl-fuzz:
|
||||||
- now prints the real python version support compiled in
|
- now prints the real python version support compiled in
|
||||||
|
- set stronger performance compile options and little tweaks
|
||||||
- afl-clang-fast now shows in the help output for which llvm version it
|
- afl-clang-fast now shows in the help output for which llvm version it
|
||||||
was compiled for
|
was compiled for
|
||||||
- added blacklisted function check in llvm_mode
|
- added blacklisted function check in llvm_mode
|
||||||
|
@ -524,7 +524,7 @@ u8 save_if_interesting(char** argv, void* mem, u32 len, u8 fault) {
|
|||||||
struct queue_entry* q = queue;
|
struct queue_entry* q = queue;
|
||||||
while (q) {
|
while (q) {
|
||||||
|
|
||||||
if (q->exec_cksum == cksum) q->n_fuzz = q->n_fuzz + 1;
|
if (q->exec_cksum == cksum) { q->n_fuzz = q->n_fuzz + 1; break ; }
|
||||||
|
|
||||||
q = q->next;
|
q = q->next;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user