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

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