Skip to content

[wasm][R2R] Re-enable open virtual delegate runtime tests - #134765

Merged
lewing merged 1 commit into
mainfrom
lewing-wasm-r2r-reenable-open-virtual-delegate-tests
Sep 28, 2026
Merged

lewing merged 1 commit into
mainfrom
lewing-wasm-r2r-reenable-open-virtual-delegate-tests

Conversation

@lewing

@lewing lewing commented Sep 28, 2026

Copy link
Copy Markdown
Member

Re-enables two JIT regression tests that were disabled on browser-wasm ReadyToRun. Both invoke an open delegate over an interface method from R2R-compiled code. Before #134699, that hit portableEntryPoint->IsValid() in the interpreted delegate shuffle thunk, because the thunk's calli passed CID_VirtualOpenDelegateDispatch to PortableEntryPoint::GetMethodDesc.

Validation (local)

Run on browser-wasm with a checked runtime, Release libraries and crossgen2 ReadyToRun (RunCrossGen2=1), matching the R2R_CG2 browser wasm checked lane. The R2R images were emitted and loaded.

Test With #134699 #134699's INTOP_CALLI branch disabled
Runtime_79354 Pass (100) portableEntryPoint->IsValid() in MyDelegate::IL_STUB_DelegateShuffleThunk, IR_0014
Runtime_70259 Pass (100) portableEntryPoint->IsValid() in System.Func`2[__Canon,Int32]::IL_STUB_DelegateShuffleThunk, IR_0014

I also checked the separate diagnosis in #130840 (a misplaced receiver in INTOP_CALLDELEGATE's open-virtual branch after R2R-to-interpreter entry). A scratch probe had R2R-compiled callers invoke interpreted DynamicMethods, which then invoke open virtual delegates. It covered interface and class-virtual targets, class and boxed-struct receivers, mixed int/long/double arguments, a Vector128 argument and a hidden-buffer struct return. All INTOP_CALLDELEGATE cases passed, including with #134699's branch disabled. Details are in #130840.

Resolves #131886
Resolves #130840

Note

This PR description was generated with GitHub Copilot.

Runtime_79354 and Runtime_70259 were disabled on wasm ReadyToRun because invoking an
open virtual delegate from R2R code hit portableEntryPoint->IsValid() in the interpreted
delegate shuffle thunk. #134699 fixed that, so remove the ActiveIssue attributes and the
TestLibrary references that were only needed for them.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@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 Sep 28, 2026
@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: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@lewing lewing added the arch-wasm WebAssembly architecture label Sep 28, 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.

@lewing
lewing merged commit 9b01df7 into main Sep 28, 2026
96 of 98 checks passed
@lewing
lewing deleted the lewing-wasm-r2r-reenable-open-virtual-delegate-tests branch September 28, 2026 03:04
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Sep 29, 2026
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

3 participants