Conversation
avrabe
pushed a commit
that referenced
this pull request
Oct 22, 2026
status: implemented, with a landed: field and a verified-by: field. Red/green: on base 0161dee, 32 of 80 executed vectors are wrong and 1 export is declined. With the fix, 88 of 88 match. #1189 did not move; it was already green on base. status_evidence_check, verdict_prose_check and claim_check all exit rc=0. Refs #1566 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
on ONE path of an if, a br_if-exited block or a loop body, then read again. The #989 snapshot_home_reg_aliases copy ran at the local.set INSIDE the construct, so on the path that skipped the write, the earlier entry named a temp that nothing had filled. if_param_get_set_i32(10, 3, 0) returned 0xdeadbee5 with r3 poisoned; wasmtime returns 0. This is the integer twin of the #1436 float detach. At every if/block/loop entry, the direct selector calls the existing snapshot for every core-register local home (r0-r3 params, r4-r8 promoted locals, i64 pair hi halves), skipping the if's own condition. +26 lines (16 code, 10 comment). New wired differential scripts/repro/int_home_alias_1566_differential.py: 11 exports x 8 rows, all non-argument registers poisoned. - Base 0161dee: rc=1. 32/80 executed vectors wrong plus 1 export declined by VCR-RA-003; 8 of 11 exports. - Fixed: rc=0, 88/88. Both negative controls are green on both binaries. - Removing Loop from the boundary set reds exactly loop_set (7/88). Byte census over scripts/repro/*.wat: 1 function in 1 module changes on the ARM relocatable paths (home_alias_class_1189_i32 ifparam: the same mov hoisted above the cmp). 0 change on self-contained and RV32. Pinned numbers: - exact emulation floor 368110 -> 368198 (ci.yml + claims.yaml) - selector_lines_code 20125 -> 20151, with a waiver - selector_lines_total 30718 -> 30744 - mutation ledger re-anchored: 5 sites moved by line, all ci_subset ids resolve Refs #1566 Refs #1189 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
status: implemented, with a landed: field and a verified-by: field. Red/green: on base 0161dee, 32 of 80 executed vectors are wrong and 1 export is declined. With the fix, 88 of 88 match. #1189 did not move; it was already green on base. status_evidence_check, verdict_prose_check and claim_check all exit rc=0. Refs #1566 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
…7 -> 235493 The boundary snapshot adds 36 instructions to the audit's corpus, +9 on each of its 4 legs. All of them come from one source: in spec-testsuite block.wast break-inner (+4) and loop.wast break-inner (+5), the promoted local r4 is copied at each enclosing block or loop. Both functions still return 0xf and 0x1f when executed. Functions audited (7307), homes watched (8370) and hits (0) are unchanged. The ci.yml block passes in full: the old pin is rc=1 on the fixed binary, and the new pin is rc=1 on the base binary. The lane record's census now covers the audit population too. Refs #1566 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
Rebased onto ffd308c (#1577, RQ-89-RELOCSINGLE). Both lanes add an oracle with an emulation floor, so the exact floor is re-derived on the merged tree rather than taken from either PR: 368110 + 60 (#1577) + 88 (this PR) = 368258. Paired control: --exact-emulation-floor 368258 rc=0; 368198 (this PR's old value) rc=1; 368170 (main's value) rc=1. The mutation ledger is re-located, not re-baselined: `mutation_survey.py reanchor` moved 7 sites, 0 not found, all R5-startup sites in crates/synth-cli/src/main.rs that #1577's CLI change shifted. The same 7 moves are reported on origin/main ffd308c alone, so the drift is #1577's, not this lane's. None is in ci_subset, which is why #1577's own replay step stayed green. mutants 34/34, controls 3/3, ci_subset 10/10 unchanged. claim_check 75/75, status_evidence rc=0, verdict_prose rc=0; artifacts/status.json regenerated byte-identical. Refs #1566 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
avrabe
pushed a commit
that referenced
this pull request
Oct 23, 2026
…el at an unreachable block join, and lands a function-level br_table edge after the dispatch RQ-89-BRVALUE (Refs #1215): DELIVERED. select_with_stack, the one lowering every affected function takes on both legs (all are pre-gated to it), had two defects: - At a block whose fall-through is unreachable but which a branch targets, the simulated operand stack was never reset to the block's entry height. Values pushed by dead code after a br/br_table were consumed by the code after the block (br.wast nested-br_table-value-index returned 12; wasmtime returns 9). BlockLabel now records the entry height, the live prefix at the first unconditional transfer, and whether a branch targets the join. End resets the model, propagates unreachability out of a loop or an untargeted block, and loud-refuses if dead code reached below the entry height. - A function-level br_table edge landed its carried value in R0 before the dispatch cascade, overwriting an index held in R0 (func.wast break-br_table-nested-num(1) returned 52; wasmtime returns 50). The landing now follows the br_table_fnret label. Evidence: - New oracle brvalue_operand_1215_differential.py, run on the default, --no-optimize and --relocatable legs: 57/144 on v0.88.0, 144/144 on the fix. - Parity oracle with its five #1215 pins removed: red on v0.88.0 with exactly those 11 assertions, green on the fix (17934/17934). - Byte census: zero newly refused functions. Three VCR-RA-003 refusals pinned under #1230 now compile correctly, so that oracle's census moves from 3 to 0. RQ-89-SELWRAP (Refs #1213): REFUTED. as-convert-operand and the issue's distinguishing probe agree with wasmtime on every leg, because the optimized path has declined the shape since v0.65. Also in this commit, squashed from three follow-ups when it was rebased onto 0b9fce7 (#1577/#1578/#1579): - The ARM corpus sweep drops ra003_switch_1230.wat from EXPECTED_DECLINES. It now compiles, and its 12 vectors match wasmtime. - The reach this moves is counted and pinned: - Spec compile census: labels.wast moves partial -> ok, so arm ok is 16, partial 29 and MVP core 13. - Home-alias audit: the new fixture adds +60 functions, +48 homes and +916 attributed instructions. - Mutation replay: the liveness entry's changed set is 53 -> 56, the +3 being the new fixture. - The exact emulation floor is re-derived on the merged tree, the mutation ledger is re-anchored, and the selector ratchets are chained over the INTALIAS and NPARESIDUE waivers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
avrabe
added a commit
that referenced
this pull request
Oct 23, 2026
…el at an unreachable block join, and lands a function-level br_table edge after the dispatch (#1583) RQ-89-BRVALUE (Refs #1215): DELIVERED. select_with_stack, the one lowering every affected function takes on both legs (all are pre-gated to it), had two defects: - At a block whose fall-through is unreachable but which a branch targets, the simulated operand stack was never reset to the block's entry height. Values pushed by dead code after a br/br_table were consumed by the code after the block (br.wast nested-br_table-value-index returned 12; wasmtime returns 9). BlockLabel now records the entry height, the live prefix at the first unconditional transfer, and whether a branch targets the join. End resets the model, propagates unreachability out of a loop or an untargeted block, and loud-refuses if dead code reached below the entry height. - A function-level br_table edge landed its carried value in R0 before the dispatch cascade, overwriting an index held in R0 (func.wast break-br_table-nested-num(1) returned 52; wasmtime returns 50). The landing now follows the br_table_fnret label. Evidence: - New oracle brvalue_operand_1215_differential.py, run on the default, --no-optimize and --relocatable legs: 57/144 on v0.88.0, 144/144 on the fix. - Parity oracle with its five #1215 pins removed: red on v0.88.0 with exactly those 11 assertions, green on the fix (17934/17934). - Byte census: zero newly refused functions. Three VCR-RA-003 refusals pinned under #1230 now compile correctly, so that oracle's census moves from 3 to 0. RQ-89-SELWRAP (Refs #1213): REFUTED. as-convert-operand and the issue's distinguishing probe agree with wasmtime on every leg, because the optimized path has declined the shape since v0.65. Also in this commit, squashed from three follow-ups when it was rebased onto 0b9fce7 (#1577/#1578/#1579): - The ARM corpus sweep drops ra003_switch_1230.wat from EXPECTED_DECLINES. It now compiles, and its 12 vectors match wasmtime. - The reach this moves is counted and pinned: - Spec compile census: labels.wast moves partial -> ok, so arm ok is 16, partial 29 and MVP core 13. - Home-alias audit: the new fixture adds +60 functions, +48 homes and +916 attributed instructions. - Mutation replay: the liveness entry's changed set is 53 -> 56, the +3 being the new fixture. - The exact emulation floor is re-derived on the merged tree, the mutation ledger is re-anchored, and the selector ratchets are chained over the INTALIAS and NPARESIDUE waivers. Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L Co-authored-by: t <t@t> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
avrabe
pushed a commit
that referenced
this pull request
Oct 23, 2026
Rebased onto bbda3f9 (#1577 RELOCSINGLE, #1578 INTALIAS, #1579 NPARESIDUE, #1583 BRVALUE). The census conflict was resolved by taking main's numbers and pinning the LIVE census of the rebuilt binary: arm 16 ok / 27 partial / 92 all_declined / 103 module_decline, riscv 9/31/94/104, aarch64 21/21/78/118, and at-least-one-export 43/40/42. Paired: main's binary passes main's pins and fails ours 9 ways; ours passes ours and fails main's 9 ways. The lane record now quotes the merged-tree figures: parity 17934/17934, 2736 modules, 828 byte-identical compiles. mutation_survey.json reanchored: 7 sites moved +96 lines in main.rs; no count changed. Refs #1582 Refs #1209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
avrabe
pushed a commit
that referenced
this pull request
Oct 23, 2026
Rebased onto bbda3f9 (#1577 RELOCSINGLE, #1578 INTALIAS, by taking main's numbers and pinning the LIVE census of the rebuilt binary: arm 16 ok / 27 partial / 92 all_declined / 103 module_decline, riscv 9/31/94/104, aarch64 21/21/78/118, and at-least-one-export 43/40/42. Paired: main's binary passes main's pins and fails ours 9 ways; ours passes ours and fails main's 9 ways. The lane record now quotes the merged-tree figures: parity 17934/17934, 2736 modules, 828 byte-identical compiles. mutation_survey.json reanchored: 7 sites moved +96 lines in main.rs; no count changed. Refs #1582 Refs #1209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
avrabe
added a commit
that referenced
this pull request
Oct 25, 2026
Rebased onto bbda3f9 (#1577 RELOCSINGLE, #1578 INTALIAS, by taking main's numbers and pinning the LIVE census of the rebuilt binary: arm 16 ok / 27 partial / 92 all_declined / 103 module_decline, riscv 9/31/94/104, aarch64 21/21/78/118, and at-least-one-export 43/40/42. Paired: main's binary passes main's pins and fails ours 9 ways; ours passes ours and fails main's 9 ways. The lane record now quotes the merged-tree figures: parity 17934/17934, 2736 modules, 828 byte-identical compiles. mutation_survey.json reanchored: 7 sites moved +96 lines in main.rs; no count changed. Refs #1582 Refs #1209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
avrabe
added a commit
that referenced
this pull request
Oct 25, 2026
…ne (#1581) * v0.89 MEM64 (#1209): an IMPORTED memory64 is refused like a defined one The refuting command ran first. As filed, the defect is already gone: a DEFINED `(memory i64 1)` has been refused at decode since v0.66.0 (4a3f608). The v0.88 binary refuses it on 16 of 16 legs, as memory 1 under multi-memory, and through the .wast path. One shape was still live. The decoder's import arm discarded the memory type, so `(import "env" "mem" (memory i64 1))` never reached refuse_memory64_module, and the imported shapes compiled rc=0 on 13 of 21 backend legs. Measured on 0161dee: - a booted self-contained Cortex-M image read 0 from an `(i64.const 16)` data segment that wasmtime reads as 42, on both selectors (the i32-memory twin reads 42); - under --safety-bounds software, a store to i64 address 0x1_0000_0008 landed at offset 8 instead of trapping, on 4 of 4 ARM legs. DecodedModule.imported_memories now records every imported memory's type. It is separate from `memories`, so data placement and the __synth_mem_* table do not move. The refusal checks both lists. Red-first test refuses_memory64_1209.rs: on the old source the two imported tests fail on 8 of 8 legs each. Newly refused: 14 modules in the tree import a memory64, all in memory64-imports.wast. All 14 were already refused ("No exported functions"), so only the reason changes. Four corpus oracles print identical output on both binaries. Byte identity: 824 fixture compiles, 0 differences. Refs #1209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L * v0.89 MEM64 (#1209): the lane record names its PR Refs #1209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L * v0.89 MEM64 (#1209): the memory64 refusal names the memory's true index WasmMemory::index counts DEFINED memories from 0, so a defined (memory i64 1) after an imported i32 memory was reported as memory 0. The diagnostic now offsets by the import count; a sixth test pins it, and it is red on the v0.88 binary. Region-table numbering is untouched (no emitted bytes move), recorded as not fixed. The lane record also lists the single-function path (8 of 8 legs refuse) and the paths not exercised (w2c2 not installed; awsm/wasker not built by default). Refs #1209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L * v0.89 MEM64 (#1582): imported memory 0 plus a defined memory is refused off ARM --relocatable The #406 multi-memory gate and module-level memory sizing read the DEFINED-memory list only, so `(import "env" "m0" (memory 1 1)) (memory 2 2)` counted as one memory, and memory 0 took the defined memory 1's size. Measured on f9ca92d against wasmtime: - memory.size 0 = 2 (wasmtime 1) on self-contained Cortex-M, RV32, AArch64 and the single-function path; - under bounds checking (ARM --safety-bounds software, the AArch64 default), 3 of 3 ARM and 4 of 4 AArch64 accesses in [64 KiB, 128 KiB) returned data where wasmtime traps. refuse_imported_multi_memory refuses an imported memory plus any other memory on every path except ARM --relocatable, where the embedder's R10 gives the correct size (measured 1); that path is unchanged. The diagnostic names the import and cites #1582. refuses_imported_multi_memory_1582.rs: red on the old gate (7 of 7 legs), green after; imported-only, defined-only, two-defined and relocatable controls are green on both. Newly refused: of 2735 modules, 17 mix an imported memory with another, all in the spec suite, and 0 of their 68 module-level legs went from accepted to refused. The merged .wast census moves 4 files to module_decline on each backend (imports1, imports4 from all_declined; memory_grow, memory_size_import from partial). The partial losses removed only wrong code: size1 returned 4 on the pre-fix image where the spec asserts 2. PINS and at-least-one-export moved 45/42/44 to 43/40/42 in the script, README, FEATURE_MATRIX and its template, SPEC_FAMILY_CENSUS and claims.yaml. Paired control: new pins pass on the fix and fail 9 ways on f9ca92d; old pins fail 9 ways on the fix. Parity still 17924/17924 (3 modules move from wasmtime-instantiate to module-decline). Byte identity: 824 compiles, 0 differences. Not fixed, reported: with ONLY an imported memory, RV32 and AArch64 return memory.size 0 = 0 (AArch64 also traps an in-bounds load). Refs #1582 Refs #1209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L * v0.89 MEM64 (#1582): re-derived on the bbda3f9 merge Rebased onto bbda3f9 (#1577 RELOCSINGLE, #1578 INTALIAS, by taking main's numbers and pinning the LIVE census of the rebuilt binary: arm 16 ok / 27 partial / 92 all_declined / 103 module_decline, riscv 9/31/94/104, aarch64 21/21/78/118, and at-least-one-export 43/40/42. Paired: main's binary passes main's pins and fails ours 9 ways; ours passes ours and fails main's 9 ways. The lane record now quotes the merged-tree figures: parity 17934/17934, 2736 modules, 828 byte-identical compiles. mutation_survey.json reanchored: 7 sites moved +96 lines in main.rs; no count changed. Refs #1582 Refs #1209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
The defect (#1566): a silent miscompile
Take an integer local that is read, then rewritten on only ONE path of an
if, abr_if-exitedblockor aloopbody, then read again. The path that skips the rewrite reads a temp register that was never filled.The cause is where the #989 copy lands.
local.getof a register-homed param pushes a REFERENCE to its home register. The #989snapshot_home_reg_aliasescopy is emitted at thelocal.set, which sits INSIDE the construct, so it runs on the writing path only:The fix
This is the integer twin of the v0.88 float fix (#1436,
detach_all_vfp_home_aliases). At everyif/block/loopENTRY, the direct selector now calls the EXISTINGsnapshot_home_reg_aliasesfor every core-register local home: r0-r3 params, r4-r8 promoted locals, and each i64 pair's hi half. The copy therefore runs on every path.if's own condition is skipped. There is no new helper and no new wildcard. The change is +26 lines inselect_with_stack.rs: 16 code, 10 comment.Red -> green, executed against wasmtime
Command:
SYNTH_BIN=<bin> python3 scripts/oracle_run.py scripts/repro/int_home_alias_1566_differential.pyThe script is new and wired into ci.yml next to the #1436 float twin. It has 11 exports × 8 argument rows, and every non-argument core register is poisoned to
0xdeadbeef.0161dee1, built in a separate worktreei64_if_setDECLINED by VCR-RA-003 (JoinValueNotAvailable). 8 of 11 exports wrong.RESULT: PASS0xdeadbee5to0.loopleg was red too: an iteration re-copied the home after it had already been overwritten.What moved
Byte census over
scripts/repro/*.wat, base vs fixed (--allow-skipped-exports):--no-optimizehome_alias_class_1189_i32.watifparam(with itsfunc_42alias). The same 2-bytemov r2, r0is hoisted from the then-arm to above thecmp. It is the same size and gives the same value on both paths.Wider population: the home-alias audit corpus. This is the spec testsuite plus
tests/plusscripts/repro, on 4 legs (m4/m4f × relocatable/self-contained), 1972 module×leg jobs in all. It also moves specblock.wastandloop.wastbreak-inner:as-call_indirect-*functions differ only in one literal-pool address that shifts after those functions.attributed instructionscount goes 235457 -> 235493 (+36), and I moved that ci.yml pin. Functions audited (7307), homes watched (8370) and hits (0) are unchanged.break-innerstill returns 0xf and 0x1f.grep -qassertions as a whole block (47). Each passes, or also passes on the base binary when run on its own (arm64_linux_host_link,aarch64_operand_classfailed only when run in parallel). The exceptions aremcdcand the haa block when run in parallel. The haa block passes when run on its own.Self-contained path: on base the reproducer emits the same in-branch copy, because the direct selector is used there as well. With the fix, the snapshot is hoisted above the
cmpin the self-contained bytes. That was checked by disassembly, not executed. RV32: the differential's WAT gives 0 of 50 wrong with every register poisoned, so its own selector is not affected.Mutation check: dropping
Loopfrom the boundary set reds exactlyloop_set(7/88). Dropping the if-condition skip stays green, since that skip only avoids a dead copy.Pinned numbers changed, each with its control:
oracle_wiring_check.py --exact-emulation-floor N: 368198 gives rc=0; 368197 gives rc=1 (ABOVE by 1); 368199 gives rc=1 (BELOW by 1); the old 368110 gives rc=1 (ABOVE by 88).selector_lines_code20125 -> 20151, with awaivers:entry and its written reason.selector_lines_total30718 -> 30744 (tracked, no waiver).claim_check.py claims.yamlreports 75/75, andartifacts/status.jsonwas regenerated.select_with_stack.rsmoved by line only, 0 were not found, and everyci_subsetid resolves.test_mutation_survey.pypasses.# ci-checks:floor moved.island_offset_invariant_345reports 307 on both base and fix.#1189 (join register aliasing a home)
The fix does NOT move it, because #1189 is already green on base.
f(0)returns 9 on base and fix, matching wasmtime.join_alias_1189gives 223 emulations, live 149/149, on both.home_alias_class_1189gives 1629 on both.home_alias_audit_corpus_1189gives 0 hits on both.i64_result_pair_1189gives 1030/1030 on both.The two are different root causes: #1189 is the join register choice, #1566 is where the snapshot is placed.
Checks run
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspace(3177 passed, 0 failed) all pass.python3 scripts/…(136) and barepython scripts/…(210, run as python3) invocation in ci.yml, skippingmutation_survey.py ciandci_mutants_gate.py, whose test suitetest_mutation_survey.pypasses instead. Non-zero results, all accounted for:oracle_evidence.py,check_varve_shadow_pins,determinism_check,mcdc_gate,elf_static_checkandemit_vex.ci_citation_floor.pyfailed only because the step that writes its input had not run first. Run in order, both exit 0.synth compilelines that come before the oracle (/tmp/*.elf). Run as whole blocks, all 37 exit 0.aarch64_calls_851,wcet_phase2-7) read$SYNTH, which defaulted to an oldsynthon PATH. WithSYNTHset to the fixed binary, all 7 exit 0.fact_spec_*_494steps need--features verify. They fail on the base binary too, and all exit 0 against a--features verifybuild of this branch.Refs #1566
Refs #1189
🤖 Generated with Claude Code
https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L