aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-19 22:49:46 +0200
committeruser <user@clank>2026-08-19 22:49:57 +0200
commit9c06e643cf5b8fe735b8088aef9ea686087e2997 (patch)
tree6896d20a827f0e453507cb10bd95c25594ce8209 /Makefile
parentparsers: fix seven bugs found by fuzzing (diff)
downloadslosh-9c06e643cf5b8fe735b8088aef9ea686087e2997.tar.gz
slosh-9c06e643cf5b8fe735b8088aef9ea686087e2997.tar.xz
slosh-9c06e643cf5b8fe735b8088aef9ea686087e2997.zip
fuzz: libFuzzer harness for all six parser surfaces
Targets: kdl, jsonval, expr, proto, osc5577, input — each compiled standalone against its own .c with ASan + UBSan, no vendor deps. Includes seed corpora from shipped configs/themes/chrome, real control API lines, terminal escape sequences, and regression inputs from the bugs already fixed. standalone_main.c replays files without the fuzzer runtime for debugging and CI. Top-level: make fuzz (run all, TIME=15 default), make fuzz-corpus (replay seeds only, fast CI gate).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b64c6ac..781851c 100644
--- a/Makefile
+++ b/Makefile
@@ -303,6 +303,13 @@ fmt-check: ## ...or just say what is not formatted
echo "run: make fmt"; exit 1; \
else echo "all $(words $(CSRC)) C and $(words $(PYSRC)) Python files formatted"; fi
+fuzz: $(BIN) ## build and run all fuzz targets (TIME=15)
+ $(MAKE) -C tests/fuzz run-all TIME=$(or $(TIME),15)
+
+fuzz-corpus: ## replay fuzz seed corpora (CI-friendly, no fuzzing)
+ $(MAKE) -C tests/fuzz replay
+ $(MAKE) -C tests/fuzz corpus
+
hooks: ## install the pre-commit hook (formats staged C)
$(Q)git config core.hooksPath .githooks
@echo "core.hooksPath -> .githooks (git commit --no-verify to skip)"