Skip to content

[wasm][R2R] Runtime_70259 asserts in ToPortableEntryPoint #133169

Description

@lewing

Description

JIT/Regression/JitBlue/Runtime_70259 passes in the CoreCLR browser-wasm interpreter lane, but asserts when the test assembly is compiled with Crossgen2 and run as ReadyToRun. The test creates an open delegate for an interface method and invokes it through a tail call.

The interpreter-only version of this assertion was tracked by #124221 and fixed by #125138. The ReadyToRun test-assembly path remains broken.

Reproduction Steps

  1. Build the CoreCLR browser-wasm runtime test layout.
  2. Build JIT/Regression/Regression_2.
  3. Run its generated script with RunCrossGen2=1 and CompositeBuildMode=1 so Runtime_70259.dll is compiled to wasm ReadyToRun.

The relevant test is src/tests/JIT/Regression/JitBlue/Runtime_70259/Runtime_70259.il.

Expected behavior

Runtime_70259 passes and returns 100, matching the interpreter lane.

Actual behavior

The ReadyToRun run aborts with:

ASSERT FAILED
    Expression: portableEntryPoint->IsValid()
    Location:   src/coreclr/vm/precode_portable.cpp:109
    Function:   ToPortableEntryPoint
Frame (InterpreterFrame):
   0) System.Func`2[__Canon,Int32]::IL_STUB_DelegateShuffleThunk, IR_0014
Expected: 100
Actual: 1

Regression?

No known regression. This was exposed by adding test-assembly ReadyToRun coverage to the merged CoreCLR browser-wasm runtime-test runner.

Known Workarounds

Skip this test when both wasm and ReadyToRun test-assembly execution are active. The interpreter lane remains enabled.

Configuration

  • CoreCLR browser-wasm, Checked
  • wasm32
  • Test assembly compiled by Crossgen2 with ReadyToRun enabled

Other information

Related issues include #124221 (the now-fixed interpreter case) and #130840 (a different wasm ReadyToRun failure involving open-instance virtual/interface delegates).

Note

This issue was authored with the assistance of GitHub Copilot.

Activity

  1. dotnet-policy-service commented on Sep 3, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
    See info in area-owners.md if you want to be subscribed.

  2. dotnet-policy-service commented on Sep 3, 2026

    @dotnet-policy-service
    Contributor

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

  3. MihuBot commented on Sep 3, 2026

    @MihuBot

    I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):

  4. added this to the 12.0.0 milestone on Sep 3, 2026
  5. removed
    untriagedNew issue has not been triaged by the area owner
    on Sep 3, 2026
  6. lewing commented on Sep 4, 2026

    @lewing
    MemberAuthor

    Duplicate of #131886, which was filed on 2026-08-05 — a month before this one. My search when filing did not turn it up; thanks to @lewing for spotting it.

    Same defect, identical signature down to the IR offset:

    #131886 this issue
    Assert portableEntryPoint->IsValid() same
    Location precode_portable.cpp:109, ToPortableEntryPoint same
    Frame MyDelegate::IL_STUB_DelegateShuffleThunk, IR_0014 System.Func\2[__Canon,Int32]::IL_STUB_DelegateShuffleThunk, IR_0014`
    Trigger open delegate over an interface method, invoked from R2R code same, reached via a tail call
    Passes interpreted interpreted
    Fails test assembly R2R on wasm test assembly R2R on wasm

    Only the test differs — Runtime_79354 there, Runtime_70259 here. #131886 also already has a root-cause analysis (INTOP_CALLI treating CID_VirtualOpenDelegateDispatch as a portable entry point) and a working prototype fix, so it is the better issue to keep. See also #130840, which looks like the same family.

    I have added the Runtime_70259 details to #131886 so nothing is lost.

    One loose end: Runtime_70259 is disabled on this path in main by an ActiveIssue pointing at this now-closed issue, in both Runtime_70259.cs and Runtime_70259.il. That reference should be retargeted to #131886.

    Closing in favour of #131886.

    Note

    This comment was authored with GitHub Copilot.

  7. locked and limited conversation to collaborators on Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions