dotnet / dotnet/runtime

[wasm][R2R] badcodeinsidefinally returns null instead of pass

Open
#133,504 3 comments 0 reactions 1 assignee Claimed by @AndyAyersMS View on GitHub
arch-wasm area-ReadyToRun disabled-test os-browser
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

### Description

The debug and release `badcodeinsidefinally` Methodical tests fail in browser-wasm CoreCLR ReadyToRun execution because `GetObj()` returns null instead of the expected `"pass"` string.

### Reproduction Steps

Run the default `runtime` pipeline for dotnet/runtime#133463 at commit `452dea3aba16d97244508b8a0fef4643de8dd26e` (Azure DevOps build 1589007, test run 43860850).

### Expected behavior

`GetObj()` leaves the protected region with the local containing `"pass"`; both variants pass output verification.

### Actual behavior

Both tests fail with:

```text
Object reference not set to an instance of an object.
at Test_badcodeinsidefinally.GetObj()
at Test_badcodeinsidefinally.Main()
```

### Regression?

Unknown; exposed by the restored browser-wasm R2R lane.

### Known Workarounds

Skip only the affected test type for wasm ReadyToRun, preserving normal wasm and non-wasm coverage.

### Configuration

- CoreCLR browser-wasm
- Checked runtime
- ReadyToRun / crossgen2

### Other information

Umbrella tracking: #133305.

> [!NOTE]
> This issue was authored with GitHub Copilot.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.