Skip to content

JIT: home dead-at-entry wasm GC register params reported to the GC - #131884

Open
AndyAyersMS wants to merge 2 commits into
dotnet:mainfrom
AndyAyersMS:fix-wasm-home-dead-gc-params
Open

JIT: home dead-at-entry wasm GC register params reported to the GC#131884
AndyAyersMS wants to merge 2 commits into
dotnet:mainfrom
AndyAyersMS:fix-wasm-home-dead-gc-params

Conversation

@AndyAyersMS

Copy link
Copy Markdown
Member

On wasm all on-frame GC locals are reported to the GC untracked (live for the whole method). So even dead GC parameters must be homed on entry.

On wasm all on-frame GC locals are reported to the GC untracked (live for the whole method). So even
dead GC parameters must be homed on entry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 89caa9c8-5b0f-4fcc-a8c4-726ac8535110
Copilot AI review requested due to automatic review settings August 5, 2026 15:30
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 5, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@AndyAyersMS

Copy link
Copy Markdown
Member Author

@adamperlin PTAL
fyi @dotnet/wasm-contrib

Fixes a runtime failure in src/tests/JIT/Regression/JitBlue/Runtime_65694/Runtime_65694_2.cs if the test assembly is R2R.

@AndyAyersMS
AndyAyersMS requested a review from adamperlin August 5, 2026 15:32
@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Aug 5, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
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.

Pull request overview

Updates WASM JIT prolog parameter homing to ensure GC-safe stack slots even when a GC parameter is dead at method entry, aligning register-parameter homing with WASM GC reporting behavior for on-frame GC locals.

Changes:

  • Adjusts the “skip homing dead-at-entry params” fast-path to not skip GC parameters that have an on-frame home (lvOnFrame && HasGCPtr()).
  • Documents why WASM requires this exception (on-frame GC locals are reported untracked / effectively live for the whole method).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 89caa9c8-5b0f-4fcc-a8c4-726ac8535110
Copilot AI review requested due to automatic review settings August 5, 2026 16:12

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants