wave 7: fuzz sidecar scaffold (fuzz/ workspace, shared crate, runner, dict, seeds skeleton)

This commit is contained in:
glm-5.3-flash committed 2026-10-10 21:02:06 +00:00
1 parent 67d1d7e34f
commit 62ff18d1ed
14 files changed
+614 -15

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Detached fuzzing runner for agent sessions: the fuzz campaign never
# runs as a foreground child of the session (OOM in a target must not
# take down the agent host), and survives the session ending.
#
# Usage: fuzz/run-detached.sh <target> [extra libfuzzer args...]
# (works from the repo root or from fuzz/; CWD-independent)
# FUZZ_RUNTIME_SECS overrides the per-campaign budget (default 600 s).
#
# Poll instead of waiting:
# tail -n 50 fuzz/artifacts/<target>-*.log
# ls fuzz/artifacts/<target>/ (crash-* / oom-* / timeout-* files)
# pgrep -f "cargo fuzz run <target>"
set -euo pipefail
target="${1:?usage: run-detached.sh <target> [extra libfuzzer args...]}"
shift
root="$(git rev-parse --show-toplevel)"
fuzz_dir="$root/fuzz"
mkdir -p "$fuzz_dir/artifacts"
runtime="${FUZZ_RUNTIME_SECS:-600}"
log="$fuzz_dir/artifacts/${target}-$(date -u +%Y%m%d-%H%M%S).log"
cd "$fuzz_dir"
setsid nohup cargo fuzz run "$target" -- \
-fork=1 -rss_limit_mb=2048 -malloc_limit_mb=2048 -timeout=25 \
-max_total_time="$runtime" "$@" \
>"$log" 2>&1 < /dev/null &
echo "pid=$! log=$log"