Skip to content

Change InitClass and InitInstantiatedClass to return void* for WASM portable entry point compatibility#131119

Merged
davidwrighton merged 1 commit into
mainfrom
copilot/next-blocker-spc
Jul 21, 2026
Merged

Change InitClass and InitInstantiatedClass to return void* for WASM portable entry point compatibility#131119
davidwrighton merged 1 commit into
mainfrom
copilot/next-blocker-spc

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Extracts the InitHelpers.cs changes from AndyAyersMS:runtime:next-blocker-spc. On WASM targets using portable entry points, call_indirect signatures must match the compiled method exactly including return arity — but the JIT already models these helpers as value-returning (result pushed then discarded). Fix: return a dummy null from both helpers.

  • InitClass: voidvoid*, invert condition (remove early return), add return null
  • InitInstantiatedClass: same treatment
  • Add comments explaining the WASM call_indirect ABI requirement

…ortable entry point compatibility

Co-authored-by: davidwrighton <10779849+davidwrighton@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 21, 2026 00:08

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.

Copilot was unable to review this pull request because there is no eligible user to bill. To allow Copilot reviews on bot-authored pull requests, enable direct organization billing in your organization's Copilot settings.

@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.

@davidwrighton
davidwrighton marked this pull request as ready for review July 21, 2026 17:30
@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.

@lewing

lewing commented Jul 21, 2026

Copy link
Copy Markdown
Member

I think this requires something like #130813 as a follow up otherwise you'll end up with signature mismatches.

@lewing lewing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM with the caveat that the various class init helpers need the same change, see linked pr

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.

4 participants