Repository navigation
crosslane_fuzz: refuse a program or op count below 1 instead of running nothing - #1452
Merged
ItsNotRexed merged 1 commit intoNov 22, 2026
Merged
Conversation
--programs 0, or any negative count, generated no program and still printed a bare "summary:" with no lines and exit 0, which reads as a pass from a fuzzer whose whole job is to fail loudly; --ops 0 built a program with no ops instead of refusing. valu_fuzz, lds_fuzz, salu_diff, f32_fuzz and mem_diff already refuse below 1, so this was the last fuzzer without the guard. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Contributor
|
Tested on Linux (WSL2 Ubuntu), Python 3.12, CPU only: pass. Tests: 35 passed. With |
Contributor
Author
|
The
|
2 tasks done
Contributor
|
Tested a0b14cb (0 behind main) on Windows 11 Home 10.0.26300 (ANSI code page 1252), Python 3.14.7, pytest 9.2.0.
The new tests fail without the change, so they cover it. AI-assisted (Claude Code). No game files. |
This was referenced Nov 22, 2026
bobcatchris
added a commit
to bobcatchris/Leonida
that referenced
this pull request
Nov 22, 2026
`--wave 32 --modes emulate` and `--wave 64 --modes native` (without `--w64-native`) each select no program that mode could run, so nothing ran, `summary:` printed with no line under it, and the exit code was 0. That is the same false pass ItsNotRexed#1452 fixed for a count below 1, reached through a flag combination, so both become usage errors before anything is generated or the harness is looked for. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as a new FUZZ item: claim.
What and why
crosslane_fuzz.pywas the last fuzzer still taking a baretype=intfor its counts:No program is generated,
summary:is printed with no line under it, and the exit code is 0. That reads as a clean pass for the differential fuzzer of the cross-lane model, and the summary is the only place the count appears.--programs -1behaves the same, and--ops 0builds a program with no ops instead of refusing.The other fuzzers already refuse below 1 —
valu_fuzz.pyandlds_fuzz.py(--programs/--max-report),salu_diff.py(--programs/--max-ops),f32_fuzz.py(--programs) andmem_diff.py(--programs/--max-ops) — so this closes the last gap from that sweep.--programsand--opsnow go through oneArgumentTypeError, so an invalid value is a single argparse line naming the option and the value, with exit 2, before anything is generated or the harness path is looked for. The--modesparser added in #638 is the same idea and this sits next to it. Defaults (100 / 24), the summary format and the exit codes (0 pass, 1 mismatch, 2 harness error, 77 no oracle tools) are unchanged.Tested
CPU only, no GPU, no game data, no
llvm-mcruns; Windows 11, CPython 3.12.13.python -m pytest tests/test_crosslane_fuzz.py -q-> 35 passed, 1 skipped.--programs 0,--programs -1,--programs -5,--ops 0->crosslane_fuzz.py: error: argument --programs: must be at least 1 (got 0)(and--opslikewise), exit 2, no stdout.--programs 2 --ops 2 --self-test->self-test OK, exit 0;--programs 1 --ops 1 --self-testlikewise.tools/crosslane_fuzz.pyreverted tomain(bb2e1842) and the new tests kept -> 3 failed, 32 passed, 1 skipped: exactly the three refusal tests fail; the pre-existing ones and the count-of-one test still pass.python -m compileall -q tools tests-> clean.Not covered: a real
--programs 100comparison run, which needs a Vulkan GPU (vk_compute_teston this machine returns the unwritten-buffer sentinel for every program whatever the op count, so the run path itself is unverified here).Checklist
docs/design.md, with how it was confirmed. (N/A, tool CLI only.)