Skip to content

[wasi][coreCLR] Exception rethrow stack-line tests fail under the wasm interpreter #130796

Open

Description

@lewing

Summary

On the CoreCLR-WASI library-test leg (#130129), two System.Runtime.Tests exception tests fail because the interpreter reports different stack-line information than the JIT:

  • System.Tests.ExceptionTests.ThrowStatementDoesNotResetExceptionStackLineSameMethod
  • System.Tests.ExceptionTests.ThrowStatementDoesNotResetExceptionStackLineOtherMethod

Both assert (via VerifyCallStack) that a rethrow (throw;) preserves the original throw's source line in Exception.StackTrace. Under the CoreCLR wasm interpreter the reported line/frame differs, so the assert fails:

Assert.True() Failure
Expected: True
Actual:   False
   at System.Tests.ExceptionTests.VerifyCallStack(...)
   at System.Tests.ExceptionTests.ThrowStatementDoesNotResetExceptionStackLine{Same,Other}Method()

These are [ConditionalFact(HasAssemblyFiles)]. On browser wasm HasAssemblyFiles is false so they skip; on wasi the bundle has real .dlls so HasAssemblyFiles is true and they run and fail. They're already [ActiveIssue]'d for Mono and Apple-mobile CoreCLR for related reasons.

Disposition

Marking these [ActiveIssue(..., IsWasi, IsCoreCLR)] on the bring-up leg. This tracks a real interpreter stack-line/EH-metadata difference to fix in the CoreCLR wasm interpreter.

Related: #130129 (CoreCLR-WASI library tests). The RuntimeFeature.DynamicCode_Jit failure on the same leg is the interp-has-no-JIT case, tracked by #123011.

Note

This issue was drafted with GitHub Copilot.

Activity

  1. dotnet-policy-service commented on Jul 15, 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. added
    os-wasiRelated to WASI variant of arch-wasm
    and removed
    os-wasiRelated to WASI variant of arch-wasm
    untriagedNew issue has not been triaged by the area owner
    on Jul 15, 2026
  3. dotnet-policy-service commented on Jul 17, 2026

    @dotnet-policy-service
    Contributor

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

  4. added this to the 12.0.0 milestone on Jul 25, 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