build: document opt-level=z + CGU=1 miscompile and CGU>=2 alternative#762
Merged
Conversation
Expand the risc0/openvm profile comments with the narrowed root cause from bisection on x86_64 Linux (rustc 1.95): the miscompile requires both opt-level="z" AND codegen-units=1, with the faulting code in eval_virtual_bus_column's inlined SIMD fold. Either mitigation alone suffices; we keep opt-level="s" + CGU=1 for single-CGU size optimization. Cross-reference the upstream issue leanEthereum/leanVM#198 so future readers can follow the investigation and any eventual rustc/LLVM fix.
noopur23
approved these changes
Apr 20, 2026
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.
Summary
Docs-only follow-up to #759. Expand the
[profile.openvm-release]/[profile.risc0-release]comments inrust/Cargo.tomlwith the narrowed root cause from a bisection session on x86_64 Linux (rustc 1.95, AMD EPYC-Genoa + GitHub runners) and cross-reference the upstream issue.Key findings now captured in-file:
opt-level = "z"ANDcodegen-units = 1. Either change alone clears it.lean_vm::tables::utils::eval_virtual_bus_columnonce inlined intolean_prover::prove_execution— a stack reload of a spilled AVX2 lane inside a 16-YMM-register-live basic block.opt-level = "z"+codegen-units >= 2) if they ever want to revisitzfor binary-size reasons.No code/config values changed — profile keys and values are byte-identical to
main. Diff is 14 lines of comment text.Test plan
cargo fmt --manifest-path rust/Cargo.toml --all -- --checkcleancargo clippy --manifest-path rust/Cargo.toml --workspace -- -D warningscleancargo metadata --manifest-path rust/Cargo.toml --no-depsparses without errorzig fmt --check pkgs build.zigclean