Repository navigation
Require matching WASM function types when folding method bodies - #135949
Merged
MichalStrehovsky merged 3 commits intoOct 19, 2026
Merged
MichalStrehovsky merged 3 commits into
MichalStrehovsky merged 3 commits into
Conversation
Identical bodies can have different WASM function types when parameters are unused. An address-taken method's jump stub forwards its parameters to the folded body, producing invalid WASM if their signatures differ. Compare lowered function types before folding on WASM. This accounts for hidden ABI parameters and leaves other architectures unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a6f3a617-acae-4f4f-95d3-20b2a0bac43c
MichalStrehovsky
temporarily deployed
to
copilot-pat-pool
October 16, 2026 13:57 — with
GitHub Actions
Inactive
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
1 similar comment
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
MichalStrehovsky
temporarily deployed
to
copilot-pat-pool
October 16, 2026 13:58 — with
GitHub Actions
Inactive
Contributor
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
This was referenced Oct 16, 2026
Closed
jkotas
reviewed
Oct 16, 2026
jkotas
approved these changes
Oct 19, 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
Require matching lowered WASM function types before folding NativeAOT method bodies.
Identical instruction bytes do not imply identical WASM signatures: methods can have different unused parameters. An address-taken method's forwarding stub passes its parameters to the folded target, making the module invalid if the target's function type differs.
Compare the lowered function types, including hidden ABI parameters, as part of method-body equality on WASM. Existing body/relocation comparisons and non-WASM behavior are unchanged.
Validation
On the combined local NativeAOT WASI bringup tree, including other unmerged enablement:
.\build.cmd clr.tools -rc Checked -lc Release -os wasi -arch wasmpassed.This branch contains only this cherry-picked commit from
main; it was not built independently. The smoke tests are not a claim of general WASM runtime correctness.Note
This PR description was generated by GitHub Copilot.