Skip to content

Address Wasm unboxing stub review feedback - #133461

Merged
davidwrighton merged 1 commit into
dotnet:mainfrom
davidwrighton:wasm-r2r-unboxing-feedback
Sep 9, 2026
Merged

davidwrighton merged 1 commit into
dotnet:mainfrom
davidwrighton:wasm-r2r-unboxing-feedback

Conversation

@davidwrighton

Copy link
Copy Markdown
Member

Summary

Validation

  • build.cmd clr -c release -os browser
  • focused WasmVirtualMethodGenerics ReadyToRun tests: 2 passed

Note

This pull request description was generated with GitHub Copilot.

Use the standard VM contract and keep the generated unboxing stub typed as void* through lookup and return.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is narrowly scoped, preserves the underlying lookup behavior (still backed by LookupPregeneratedThunkByString), and improves consistency without altering the unboxing-stub resolution flow.

Pull request overview

This PR makes a small consistency/cleanup update in the WASM CoreCLR VM helper used to resolve pregenerated ReadyToRun unboxing stubs, aligning it with established VM contract patterns and keeping the stub pointer typed as void* end-to-end.

Changes:

  • Replace the explicit CONTRACTL block in GetUnboxingStub with STANDARD_VM_CONTRACT.
  • Use LookupPortableEntryPointThunk so the looked-up unboxing stub remains a void* (and compare against nullptr), avoiding extra PCODE casts.
File summaries
File Description
src/coreclr/vm/wasm/helpers.cpp Uses STANDARD_VM_CONTRACT for GetUnboxingStub and switches to LookupPortableEntryPointThunk to keep the resolved stub typed as void*.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

@davidwrighton
davidwrighton merged commit 0285695 into dotnet:main Sep 9, 2026
52 of 55 checks passed
lewing added a commit to lewing/runtime that referenced this pull request Sep 9, 2026
Resolve GetUnboxingStub overlap with dotnet#133461 by retaining its STANDARD_VM_CONTRACT and void-pointer lookup while returning the target entrypoint checked by the adapter guard.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants