Add fuzz testing corpus and build

This commit is contained in:
2025-10-15 10:50:51 +02:00
parent c50655682e
commit 246d62c029
117 changed files with 326 additions and 3 deletions
+16
View File
@@ -1,4 +1,7 @@
AFL_CC ?= afl-clang-fast
AFL_CXX ?= afl-clang-fast++
.PHONY: all coverage coverage_report install uninstall
all: wl
@@ -19,6 +22,19 @@ coverage_report:
lcov --remove coverage.info '/usr/*' --output-file coverage_filtered.info
genhtml coverage_filtered.info --output-directory coverage_html --title "WL Template Engine Coverage"
fuzz: fuzz.c wl.c wl.h
$(AFL_CC) fuzz.c wl.c -o fuzz \
-g -O3 -Wall \
-fsanitize=address,undefined \
-fno-omit-frame-pointer
bugs: fuzz
AFL_SKIP_CPUFREQ=1 afl-fuzz \
-i fuzz_input \
-o /tmp/fuzz_output \
-m none \
./fuzz
install: wl
sudo cp wl /usr/local/bin