Repository navigation
Avoid tagged shared dynamic-interface vtable entries on WASM - #135957
Merged
MichalStrehovsky merged 1 commit intoOct 16, 2026
Merged
MichalStrehovsky merged 1 commit into
MichalStrehovsky merged 1 commit into
Conversation
Emit null sealed-vtable entries for unsupported shared IDynamicInterfaceCastable implementations. WASM function-pointer relocation addends identify funclets and cannot encode the instantiating-thunk flag. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a6f3a617-acae-4f4f-95d3-20b2a0bac43c
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. |
Contributor
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
jkotas
approved these changes
Oct 16, 2026
This was referenced Oct 16, 2026
Closed
Member
Author
|
/ba-g widespread mutex failures; this change is not exercised by CI |
This branch was successfully deployed
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
Avoid emitting unsupported tagged shared
IDynamicInterfaceCastablemethod pointers in NativeAOT WASM sealed vtables.The instantiating-thunk flag is encoded as a function-pointer relocation addend. WASM function pointers are table indices, and the object writer interprets nonzero function addends as funclet ordinals. The flag therefore becomes a reference to a nonexistent funclet and crashes compilation.
Emit null entries for shared dynamic-interface implementations on WASM, with a TODO marking the unsupported scenario. Other sealed-vtable entries and non-WASM targets are unchanged.
This is deliberately a compile-time bringup fix, not runtime support for shared dynamic-interface dispatch. Real support needs a signature-correct way to supply the generic context; changing the pointer encoding alone is insufficient.
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. Unsupported shared dynamic-interface dispatch itself was not executed.Note
This PR description was generated by GitHub Copilot.