Skip to content

Disable scope info for wasm targets - #129636

Merged
AndyAyersMS merged 1 commit into
dotnet:mainfrom
AndyAyersMS:main
Jun 21, 2026
Merged

AndyAyersMS merged 1 commit into
dotnet:mainfrom
AndyAyersMS:main

Conversation

@AndyAyersMS

Copy link
Copy Markdown
Member

Wasm virtual registers cannot be encoded in ICorDebugInfo, and there is no native debugger to consume scope info. Disables compScopeInfo for TARGET_WASM and guards return-value collection on the same flag.

Fixes #129630.

Note

This contribution was generated with the assistance of GitHub Copilot.

Wasm virtual registers cannot be encoded in ICorDebugInfo,
and there is no native debugger to consume scope info.

Fixes dotnet#129630.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings June 19, 2026 20:10
@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 Jun 19, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
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

This PR updates CoreCLR RyuJIT debug-info option initialization and call-site return-value reporting so that scope info is disabled for WASM targets, avoiding generation of scope/variable location data that cannot be represented in the ICorDebugInfo register encoding.

Changes:

  • Disable opts.compScopeInfo under TARGET_WASM during Compiler::compInitOptions.
  • Gate managed return-value reporting emission on opts.compScopeInfo (in addition to opts.compDbgInfo) to avoid attempting to encode WASM virtual registers into debug scope info.

Reviewed changes

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

File Description
src/coreclr/jit/compiler.cpp Forces opts.compScopeInfo = false for TARGET_WASM during option initialization.
src/coreclr/jit/codegencommon.cpp Skips emitting managed return-value reporting entries when compScopeInfo is disabled.

@AndyAyersMS

Copy link
Copy Markdown
Member Author

@adamperlin PTAL
fyi @dotnet/wasm-contrib

@AndyAyersMS
AndyAyersMS merged commit 3b1cc5f into dotnet:main Jun 21, 2026
140 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone Jun 23, 2026
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
Wasm virtual registers cannot be encoded in ICorDebugInfo, and there is
no native debugger to consume scope info. Disables compScopeInfo for
TARGET_WASM and guards return-value collection on the same flag.

Fixes #129630.

> [!NOTE]
> This contribution was generated with the assistance of GitHub Copilot.

Co-authored-by: Copilot <[email protected]>
ManickaP pushed a commit to ManickaP/runtime that referenced this pull request Jul 22, 2026
Wasm virtual registers cannot be encoded in ICorDebugInfo, and there is
no native debugger to consume scope info. Disables compScopeInfo for
TARGET_WASM and guards return-value collection on the same flag.

Fixes dotnet#129630.

> [!NOTE]
> This contribution was generated with the assistance of GitHub Copilot.

Co-authored-by: Copilot <[email protected]>
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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.

JIT asserts genIsValidIntReg in scope-info for wasm R2R in MinOpts

3 participants