Open and answer this issue on GitHub.
ready · opened 2026-11-21 · updated 2026-11-21 · 0 comments
Part of #784 After #784
Fuzzing with cargo-fuzz (libFuzzer, nightly) for the unsafe crates under crates/unsafe/, each target compared with a safe reference, run by a job unsafe_fuzz beside unsafe_crates in .github/workflows/nikaia.yml, under the same condition and gating promote. Decided in #784 (Decision, two fuzz budgets): on a push each target runs a fixed number of runs with a fixed seed and no cached corpus; the daily run uses a larger budget with the corpus cached; the budget is a number of runs, never a time. This is step 4 of #784; it needs the daily cron that #784 keeps.
--fuzz RUNS in scripts/check-unsafe-crates.sh; the job unsafe_fuzz in nikaia.yml and in promote’s needs, running -runs=100000 -seed=1 with no cache on a push and -runs=1000000 with the corpus cached per target (actions/cache) on the daily cron, a crash uploading the reproducing input as an artifact; targets in crates/unsafe/<crate>/fuzz/, a crate of its own outside the crate’s workspace so the workspace and its Cargo.lock stay as they are: checked-text (arbitrary bytes, compared with std::str::from_utf8) and c-text (arbitrary bytes with a zero byte appended; the length and the bytes read back equal the input up to the first zero).byte-blocks (arbitrary 64-byte blocks and sets, the vector path against a scalar loop), crc32c (arbitrary words, the crc32 path against the table-driven path), low-bits (arbitrary (x, n), against the mask).shared-bytes and tether: an arbitrary sequence of operations (make, clone, slice, drop), checked against a plain Vec<u8> model.Test for each: each target runs its budget clean; break the reference comparison in a scratch change and see the target find it (not committed).
sh scripts/check-unsafe-crates.sh --fuzz 100000 runs every target above clean, and the job unsafe_fuzz runs them in nikaia.yml with the push and daily budgets and gates promote; the commit of item 3 says Fixes #N.
scripts/check-unsafe-crates.sh, .github/workflows/nikaia.yml, crates/unsafe/<crate>/fuzz/ for checked-text, c-text, byte-blocks, crc32c, low-bits, shared-bytes, tether.
Split from #784 by Claude Code