Skip to content

Oracles: seven new checks for rustc; findings 19–28 - #29

Merged
zmaril merged 14 commits into
mirth/checksfrom
mirth/oracles
Oct 10, 2026
Merged

zmaril merged 14 commits into
mirth/checksfrom
mirth/oracles

Conversation

@zmaril

@zmaril zmaril commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Stacked on the checks PR (mirth/checks).

The first seven checks of the build order in docs/checks.md. The scripts share rustc/uitest.py (UI-test headers, building, running, Miri, the job driver), and each has --recheck, --known and --pause-on-finding for the frontier loop. Results are at the end of docs/checks.md.

check script swept result
optimization and pass differential opt-diff.py 3,217 runnable UI tests × 13 configurations no bugs
solver differential (old/new solver, NLL/Polonius) solver-diff.py 17,634 tests the 29 already known
Miri differential (MIR opt levels 0/2/4, native) miri-diff.py 3,094 tests no bugs
equivalent rewrites (generic-wrap, alias, reorder, unused) crates/mirth-rewrite, rewrite-diff.py 18,624 tests findings 25, 28
ABI vs clang abi-diff.py 21 targets × 3,000 random signatures findings 19, 20
internal checks (a debug-assertions compiler, -Zvalidate-mir) crash-diff.py 18,624 tests findings 21–24
release-to-release on real crates release-diff.py 87 repositories findings 26, 27

New findings (docs/hunt.md, with facts pages and reductions)

  • 19: riscv64/loongarch64, narrow integer arguments on the stack are not sign-extended.
  • 20: riscv/loongarch, a {float, pointer} struct is passed in FP + integer registers; clang uses integer registers.
  • 21–24: 17 UI tests trip MIR validation or debug assertions. Not seen in CI: UI tests don't run with -Zvalidate-mir, and compiletest pins the old solver.
  • 25: an invalid constant is rejected or accepted depending on genericity and the MIR opt level.
  • 26: the never-type fallback change breaks meilisearch with no warning beforehand.
  • 27: the new solver doesn't infer a parameter reached only through a projection; breaks surrealdb via diskann-wide.
  • 28: glob-import ambiguity depends on item order. In one order it's an error; in the other a different function is called.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT

zmaril and others added 14 commits October 9, 2026 23:06
…rentials; findings 19 and 20 (RISC-V/LoongArch ABI)

rustc/opt-diff.py runs each runnable UI test under 13 configurations (opt levels, MIR opt levels,
LTO, target CPU, Cranelift) and compares behavior with the unoptimized baseline. solver-diff.py
compiles every UI test with the old and new trait solvers and with Polonius, and runs one-sided
acceptances under Miri. miri-diff.py interprets runnable tests at MIR opt levels 0, 2 and 4 and
compares with the compiled program. rewrite-diff.py applies mirth-rewrite's meaning-preserving
rewrites (generic-wrap, alias, reorder, unused) and compares verdicts and error codes. abi-diff.py
compares rustc's extern "C" lowering with clang's for random C signatures on 21 main targets.
uitest.py holds the shared header reading, building, running, Miri and job driver.

Findings 19 (stack-passed narrow integers not sign-extended) and 20 (float+pointer structs in
FP registers) on riscv64 and loongarch64, from abi-diff.py.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
…s), crash-diff.py (UI tests under a debug-assertions compiler with -Zvalidate-mir); harness fixes: full builds where monomorphization matters, argv[0] and test timings, rewrites without lint attributes, files that cannot move skipped

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
…er, Cranelift's own panics as backend gaps; the sweep over 3,217 runnable UI tests and 13 configurations has no differences left

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
…threaded tests not compared natively, UB in tests with their own unsafe code noted, tests that assert unspecified behavior listed; the sweep over 3,094 runnable UI tests has no findings left

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
…d parameters, cfg (not cfg_attr) copied, inline modules untouched; rewrite-diff.py: a private copy of the rewriter per sweep, only verdicts are findings, generic-wrap skips generic_const_exprs

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
…ions) failing on 17 UI tests that pass the release compiler; crash-known.txt

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
… MIR opt level; alias rewrite leaves receivers alone

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
…are noted, not reported

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
…ior warning) and 27 (new solver: parameter reached only through a projection not inferred; surrealdb via diskann-wide); alias rewrite leaves impl self types and attributed parameters alone

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
… order, a different function called in the other)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
…se for a recursion_limit=6 test

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
… the trackers, with severity and what to report

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
@zmaril
zmaril added this pull request to stack #32 October 10, 2026 08:50
@zmaril
zmaril merged commit 76ab15f into main Oct 10, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant