test(vcr-oracle): pin #518 cross-backend contrast — RV32 loud-skips vs ARM silent miscompile (#242)#528
Merged
Merged
Conversation
…ps, ARM silently miscompiles (#242, #518) No new external signal this issue-hunt pass (gates #418/#472/#396-emitter still await external triggers; no new issues/comments since watermark; deps unchanged). Bounded behavior-frozen #242 increment, cross-backend parity (VCR-SEL-005): measure how the #518 i64-param root cause manifests on RISC-V. Measured (objdump symtab + compile stderr): the SAME root cause (an i64 param is never classified i64, so it reaches an i64 op as an i32 operand) is SILENT on ARM (#518 miscompile) but LOUD-SKIPPED on RV32. The RV32 selector validates the operand-stack TYPE before lowering an i64 op, hits `stack type mismatch ... expected i64, found i32`, returns a typed Err → `warning: skipping function …` + absent symbol. That is the #378/#180/#185 never-guess Ok-or-Err contract acting as the honest-fail backstop ARM's select_with_stack LACKS for i64 params. So on this class RV32 is INCOMPLETE-but-SOUND; ARM is COMPLETE-but-UNSOUND until the gated fix. - scripts/repro/i64_param_518_riscv_loudskip.py: asserts all 7 i64-param fns are loud-skipped (warning + absent symbol) AND the i32 control (t_i32) is emitted (non-vacuity — the skip is #518-specific, not a blanket backend failure). A regression removing the RV32 stack-type guard would flip a loud-skip into a silent miscompile, which the oracle catches. - roadmap VCR-ORACLE-001 #518 entry: record the cross-backend contrast. FROZEN-SAFE — no codegen touched (frozen anchors 3/3 green); rivet clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
What
Issue-hunt pass with no new external signal (gates #418/#472/#396-emitter still await external triggers; no new issues/comments since the watermark; deps unchanged). Bounded behavior-frozen #242 increment serving cross-backend parity (VCR-SEL-005): measure how the #518 i64-param root cause manifests on RISC-V.
Measured — same root cause, opposite manifestation
objdumpsymtab + compile stderr: the same omission (an i64 param is never classified i64, so it reaches an i64 op as an i32 operand) is silent on ARM (#518 miscompile) but loud-skipped on RV32. The RV32 selector validates the operand-stack type before lowering an i64 op →stack type mismatch ... expected i64, found i32→ typedErr→warning: skipping function …+ absent symbol. That is the #378/#180/#185 never-guess Ok-or-Err contract acting as the honest-fail backstop ARM'sselect_with_stacklacks for i64 params.So on this class RV32 is incomplete-but-sound (no silent wrong-code); ARM is complete-but-unsound until its gated fix — the precise VCR-SEL-005 parity shape (ARM lowers X; RV32 loud-declines X).
Changes (frozen-safe — no codegen touched; frozen anchors 3/3 green)
scripts/repro/i64_param_518_riscv_loudskip.py: asserts all 7 i64-param fns are loud-skipped (warning + absent symbol) and the i32 control (t_i32) is emitted (non-vacuity — the skip is arm: i64 binop with an i64 param silently miscompiles — param read from wrong registers (both paths) #518-specific, not a blanket backend failure). A regression removing the RV32 stack-type guard would flip a loud-skip into a silent miscompile, which this oracle catches.VCR-ORACLE-001arm: i64 binop with an i64 param silently miscompiles — param read from wrong registers (both paths) #518 entry: record the cross-backend contrast.rivet clean. The byte-changing fix stays a separate gated step.
Refs #242, #518.
🤖 Generated with Claude Code