Repository navigation
chore: bump Rust nightly to fix closure-call miscompilation - #411
Conversation
Use nightly-2026-04-23, the first nightly with rust-lang/rust#155343, which fixes the indirect closure argument miscompilation in rust-lang/rust#155241.
Claude review status
✅ Review clean Last reviewed: head New this round: 0 finding(s), 0 question(s) · Resolved this round: 0 · Open questions: 0 |
🧬 Mutation testing — ✅ PASSNothing to test — no mutants were generated on the changed lines. |
🧬 Mutation testingNo results at |
Merging this PR will improve performance by 5.68%2 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
|
Verified on Linux x86_64, independent worktrees, no product-code edits.
This PR Same two filters, debug and Note: on current |
Summary
Moves the pinned Rust nightly from
nightly-2026-04-14tonightly-2026-04-23, the first nightly with the fix for a code-generation bug in closure calls (rust-lang/rust#155241, fixed by rust-lang/rust#155343). No source changes: the new nightly brings no new clippy or rustfmt findings, sorust-toolchain.tomlis the only file that changes. No execution result changes; the evidence is below.Why
With the old pin, a by-value argument passed by pointer to a closure call (a type over two words, such as a
Vec) can be the caller's own memory instead of a temporary copy, and the callee can mutate it in place. From Rust 1.91 this shows as a double free, and on 1.77–1.90 as silently wrong values. Four tests incrates/mega-evm/tests/rex6/(the volatile-guardrun(first, second)bytecode-builder helpers) abort in an optimized build on the old pin, and pass on the new one. The repository keeps a nightly because of Miri,rust-srcand its nightly-only rustfmt options.The same results under both compilers
mega-evmebuilt by each compiler: 200 consecutive Rex6 blocks (5,201 transactions) and 31 blocks across every spec (799 transactions). Every receipt and block check matches the chain on both, and the two outputs are byte-identical.state-test --json-outcomeover the execution-spec state tests: all 48,938 outcomes are byte-identical between the two compilers, the existing baseline failures included.Verification
cargo fmt --all --check; clippy with CI's flags and-D warnings;cargo sort --check; theno_stdcheck onriscv64imac-unknown-none-elf.RUSTFLAGS="-D warnings" cargo test --workspace --release --lockedpasses, including the four rex6 tests that abort on the old pin; the debugcargo test --workspaceand themega-evmetests pass.rust-toolchain.toml; no other place names the old date.Notes