macovedj opened PR #14455 from macovedj:winch-typed-select-stack-maps to bytecodealliance:main:
Winch records a
selectresult using the second operand’s internal type, even for a typedselectwith a declared result type. In #14451, that operand isref.null extern, which Winch represents internally asI32. When the condition chooses the liveexternreffrom the first operand, the value is correct, but Winch still records the result asI32. The next call’s stack map then omits the live reference, so a collector can lose it.This PR records a typed
selectresult using its declared type and adds x86-64 and AArch64 stack-map tests, plus runtime tests for all collectors.Fixes #14451.
macovedj requested cfallin for a review on PR #14455.
macovedj requested wasmtime-compiler-reviewers for a review on PR #14455.
macovedj requested wasmtime-core-reviewers for a review on PR #14455.
macovedj updated PR #14455.
:memo: saulecabrera submitted PR review:
LGTM; can we add a disassembly test for a live-ref/null case? I know we have runtime tests for this case, but I think a disas tests might still be useful.
macovedj updated PR #14455.
macovedj updated PR #14455.
macovedj updated PR #14455.
:thumbs_up: saulecabrera submitted PR review.
saulecabrera has enabled auto merge for PR #14455.
saulecabrera added PR #14455 winch: preserve typed select result type for GC stack maps to the merge queue.
github-merge-queue[bot] removed PR #14455 winch: preserve typed select result type for GC stack maps from the merge queue.
macovedj updated PR #14455.
macovedj commented on PR #14455:
Looks like CI failed from running on unsupported targets. Added some architecture guards.
alexcrichton commented on PR #14455:
Could the tests here use
#[wasmtime_test]to avoid test-specific guards?
macovedj updated PR #14455.
github-actions[bot] added the label winch on PR #14455.
github-actions[bot] commented on PR #14455:
Subscribe to Label Action
cc @saulecabrera
<details>
This issue or pull request has been labeled: "winch"Thus the following users have been cc'd because of the following labels:
- saulecabrera: winch
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
saulecabrera added PR #14455 winch: preserve typed select result type for GC stack maps to the merge queue.
:check: saulecabrera merged PR #14455.
saulecabrera removed PR #14455 winch: preserve typed select result type for GC stack maps from the merge queue.
Last updated: Oct 11 2026 at 04:10 UTC