Fuzz (#1000)
* Integration with oss-fuzz * Use CFLAGS even for linking as for fuzzing with asan * Do not abort on uc_emu_start error * Redirect fuzz output somewhere else than stdout * Use uc_open for every fuzz instance * Avoids timeouts from infinite loops Limiting the number of instructions * Moving fuzz to tests directory
This commit is contained in:
committed by
Nguyen Anh Quynh
parent
0f14c47344
commit
feb46abb4a
22
tests/fuzz/Makefile
Normal file
22
tests/fuzz/Makefile
Normal file
@@ -0,0 +1,22 @@
|
||||
CFLAGS += -L ../../ -I ../../include
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S), Linux)
|
||||
LDFLAGS += -lrt -pthread
|
||||
endif
|
||||
|
||||
LDFLAGS += -lunicorn
|
||||
|
||||
|
||||
ALL_TESTS_SOURCES = $(wildcard fuzz*.c)
|
||||
ALL_TESTS = $(ALL_TESTS_SOURCES:%.c=%)
|
||||
|
||||
.PHONY: all
|
||||
all: ${ALL_TESTS}
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf ${ALL_TESTS}
|
||||
|
||||
fuzz%: fuzz%.c
|
||||
$(CC) $(CFLAGS) $^ onefile.c $(LDFLAGS) -o $@
|
||||
Reference in New Issue
Block a user