Skip to content

mirth's own checks over the corpus: --compiler-checks, ui-incr (P6 over the UI suite); finding 56 - #42

Merged
zmaril merged 2 commits into
mainfrom
mirth/reuse-sweep
Oct 10, 2026
Merged

zmaril merged 2 commits into
mainfrom
mirth/reuse-sweep

Conversation

@zmaril

@zmaril zmaril commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Step 1 of leaning on mirth more: the patched compiler's own checks (verify-reuse.patch and report-untracked.patch in rustc-verify12) had only run in the fuzzer, the replays and the flag walks. This PR turns them on over the corpus.

What's added

  • --compiler-checks for the sweep driver; used by diag-check and gate-mutate.
    • Each compile becomes an incremental session with RUSTC_VERIFY_REUSE=all and RUSTC_REPORT_UNTRACKED. Both checks hook the dependency graph, so they do nothing without -Cincremental.
    • Reports are classified against rustc/untracked-known.tsv: every (what, file) pair the fuzzer, replays and flag walks reported, plus options whose verdict holds anywhere. Reuse reports are classified against rustc/reuse-known.txt.
    • New library module compiler_checks.rs, plus Compile::compiler_checks.
  • mirth-lab ui-incr: P6 over the UI corpus.
    • For each test: a clean incremental session, then three rebuilds in it (unchanged; every span moved by a leading blank line; an unused fn appended).
    • Each rebuild is compared with a clean build of the same source on diagnostics, output bytes, and program output.
    • The reuse check and the untracked-read report are on in every session.
  • big-run.sh runs diag-check-cc and ui-incr.

Results

Sweep Scope Result
ui-incr 18,502 tests × 3 rebuilds Finding 56; otherwise no incremental/clean difference in bytes, program output or diagnostics
diag-check --compiler-checks 18,374 tests, every cached value recomputed No difference; no new untracked read
gate-mutate --compiler-checks 3,000 mutants Nothing reported

Finding 56. With -Zunleash-the-miri-inside-of-you, the flag's warning and its feature-gate error come from session state that const checking fills as a side effect. An incremental rebuild therefore drops both, and accepts a crate that a clean build rejects. Low severity: the flag exists for testing the const evaluator. The lost warning goes back to at least 1.80.0; the error case was shown on nightly-2026-10-06. Facts are in docs/hunt/unleash-incremental.md, with a repro in docs/hunt/tests/.

Triaged, not findings (details in checks.md, fourth batch):

  • Allocation identity in const-eval results across typing modes (222 tests). This is finding 8's mechanism. No output effect was observed.
  • The reuse check re-emitting lints when it recomputes values (4 tests). This is an artifact of our patch; it's noted in shadow-mode.md.
  • New source-text read sites. 46 sites in 15 queries, all in the known class.
  • Two harness artifacts, fixed:
    • the flag order with a trailing --cap-lints;
    • the per-session object-name suffix, which had made 78 tests look nondeterministic.

release-diff is not wired in, because it builds with official toolchains that don't have the patches.

Note: this branch numbers its finding 56. If another branch merges first, it may need renumbering.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT

zmaril and others added 2 commits October 10, 2026 12:50
…piler-checks (diag-check, gate-mutate), and ui-incr (P6 over the UI corpus with the reuse check); known untracked reads and reuse reports in rustc/

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
…ect names removed, reuse-check re-emissions told from duplicates; known reuse reports; finding 56 (-Zunleash: an incremental rebuild drops the warning and the feature-gate error); fourth batch in checks.md

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
@zmaril

zmaril commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

Merged into main with #41–#46; renumbered at merge: finding 56 is now 58 (docs/hunt.md).

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