test(vcr-oracle): broaden #518 oracle to the full AAPCS i64-param matrix (#242)#526
Merged
Merged
Conversation
…rix (#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: harden the #518 characterization oracle (landed #525) to cover the AAPCS register-assignment cases the gated fix's mapping logic must handle but the single-param fixture missed. Measured (objdump force-thumb + unicorn vs wasmtime) — distinct failure modes the sequential `index_to_reg(i)` param mapping produces beyond the single-param clobber: - (i64,i64): p1 is the even-aligned pair R2:R3 but sequential mapping puts it at R1, so `i64.add(p0,p1)` emits `adds r3,r0,r1` = p0.lo+p0.hi (not p0+p1). - (i64,i32): the trailing i32 param (R2) is ignored entirely. - reading only the SECOND i64 param: sequential reads p1 from R1 (wrong) AND the i64.const clobbers R2 (the real p1.lo). Fixture grows by t_ii_add / t_i64_i32 / t_snd_i64; the differential gains those cases (AAPCS-correct arg placement already handles even-aligned pairs) and an explicit i32-control-regression guard (a broken control now FAILS the characterization rather than being masked by the divergence count). Result: 10/10 i64-param functions diverge on BOTH paths; i32 control correct on both. FROZEN-SAFE — no codegen touched (frozen anchors 3/3 green); rivet clean. The byte-changing fix stays a separate gated step. 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: harden the #518 characterization oracle (landed #525) to cover the AAPCS register-assignment cases the gated fix's mapping logic must handle but the single-param fixture missed.
Measured — distinct failure modes beyond the single-param clobber
objdump -M force-thumb+ unicorn vs wasmtime, on the sequentialindex_to_reg(i)param mapping:(i64,i64): p1 is the even-aligned pair R2:R3 but sequential mapping puts it at R1, soi64.add(p0,p1)emitsadds r3,r0,r1= p0.lo+p0.hi (not p0+p1).(i64,i32): the trailing i32 param (R2) is ignored entirely.i64.constclobbers R2 (the real p1.lo).Changes (frozen-safe — no codegen touched; frozen anchors 3/3 green)
i64_param_518.wat: +t_ii_add/t_i64_i32/t_snd_i64.i64_param_518_differential.py: + those cases (AAPCS-correct arg placement already handles even-aligned pairs) and an explicit i32-control-regression guard (a broken control now fails the characterization rather than being masked by the divergence count). Result: 10/10 i64-param fns diverge on both paths; i32 control correct on both.VCR-ORACLE-001arm: i64 binop with an i64 param silently miscompiles — param read from wrong registers (both paths) #518 entry: note the full single/dual/even-aligned matrix coverage.rivet clean. The byte-changing fix stays a separate gated step.
Refs #242, #518.
🤖 Generated with Claude Code