You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two reflection invoke test variants produce IndexOutOfRangeException instead of the expected NotSupportedException under trimmed browser-Wasm CoreCLR ReadyToRun.
The failures reproduced in PR #133656, Azure DevOps build 1603190, Helix job 3158c862-61f5-4cf9-bb24-6ecdf2cfe895, work items WasmTestOnChrome-CLR-ST-Batch-10 and Batch-12.
Expected behavior
MethodInfo.Invoke rejects the by-ref-like argument shape with NotSupportedException.
Actual behavior
Assert.Throws() Failure: Exception type was not an exact match
Expected: typeof(System.NotSupportedException)
Actual: typeof(System.IndexOutOfRangeException)
---- System.IndexOutOfRangeException: Index was outside the bounds of the array.
Regression?
Unknown. The same test has existing platform-specific exclusions for Mono and Apple mobile, but this browser CoreCLR ReadyToRun configuration is newly enabled.
Known Workarounds
Temporarily exclude this exact test method only when PlatformDetection.IsWasmReadyToRun is true. Interpreter and other-platform coverage remains enabled.
Description
Two reflection invoke test variants produce
IndexOutOfRangeExceptioninstead of the expectedNotSupportedExceptionunder trimmed browser-Wasm CoreCLR ReadyToRun.Affected test:
The failure occurs in both
System.Runtime.ReflectionInvokeInterpreted.TestsandSystem.Runtime.ReflectionInvokeEmit.Tests.Reproduction Steps
Build and run either affected test project for browser-Wasm CoreCLR with:
The failures reproduced in PR #133656, Azure DevOps build 1603190, Helix job
3158c862-61f5-4cf9-bb24-6ecdf2cfe895, work itemsWasmTestOnChrome-CLR-ST-Batch-10andBatch-12.Expected behavior
MethodInfo.Invokerejects the by-ref-like argument shape withNotSupportedException.Actual behavior
Regression?
Unknown. The same test has existing platform-specific exclusions for Mono and Apple mobile, but this browser CoreCLR ReadyToRun configuration is newly enabled.
Known Workarounds
Temporarily exclude this exact test method only when
PlatformDetection.IsWasmReadyToRunis true. Interpreter and other-platform coverage remains enabled.Configuration
Browser-Wasm CoreCLR Release, aggressively trimmed per-app ReadyToRun, Linux Helix host, Chrome 153.
Other information
Re-enable when both reflection invocation implementations return the documented exception under Wasm ReadyToRun.
Note
This issue was generated with GitHub Copilot assistance and reviewed as part of the #133193 bring-up.