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
While enabling trimmed browser CoreCLR ReadyToRun library tests for #133193, System.Tests.ArrayTests.BinarySearch_TypesNotIComparable_ThrowsInvalidOperationException<object> aborts the process. This is an R2R execution failure, not a missing trimming descriptor: the same existing test passes all four data rows in a clean aggressively trimmed build with R2R disabled.
Reproduction Steps
Build the browser CoreCLR runtime, libraries, host, packs, and host crossgen2. This was reproduced on runtime commit 798449390515fa02f4b20160bedc5e34f8fbdfb9 with the publishing prerequisites from #133378 at 245cb70d593f2c8f3a4e23bcc422e7da5926e15b. Enable the existing iOS ILLink.Descriptors.iOS.xml for browser aggressive trimming in System.Runtime.Tests, and remove the stale .ilprojLink metadata from its TestILAssembly project reference so VFS staging succeeds.
Use clean project-specificbrowser-wasm obj/bin outputs when switching PublishReadyToRun to false; otherwise stale staging can cause an unrelated System.Runtime assembly-load failure.
The existing theory exercises non-generic and generic Array.BinarySearch overloads. Its failing data row uses two distinct object instances; the comparer exception is expected to be wrapped in InvalidOperationException. The precise failing overload has not yet been isolated.
Expected behavior
All four existing data rows pass, as they do with aggressive trimming enabled and R2R disabled.
Actual behavior
R2R discovers the theory, executes its Int32 row, starts its Object row, and terminates:
No managed assertion failure is reported. With R2R disabled, the clean trimmed run reports Tests run: 4 Passed: 4 Failed: 0 Skipped: 0.
Regression?
Unknown. The observed distinction is R2R on versus off with trimming retained, not an older-versus-newer runtime comparison.
Known Workarounds
Disable R2R for the application. A narrowly scoped browser-R2R ActiveIssue can quarantine this theory during library-test bring-up without disabling interpreter coverage.
Configuration
Browser-wasm CoreCLR Release, macOS arm64 build host, Chromium 153.0.8010.0, bootstrap SDK 11.0.100-rc.1.26420.103. The served CoreLib contains a nonzero R2R table.
Other information
Related to library-test bring-up #133193. #133547 fixes a potentially related catch-resumption GC-mode bug, but has not been tested against this reproduction and is not established as its fix.
Note
This issue was generated by GitHub Copilot from local build and test results.
Description
While enabling trimmed browser CoreCLR ReadyToRun library tests for #133193,
System.Tests.ArrayTests.BinarySearch_TypesNotIComparable_ThrowsInvalidOperationException<object>aborts the process. This is an R2R execution failure, not a missing trimming descriptor: the same existing test passes all four data rows in a clean aggressively trimmed build with R2R disabled.Reproduction Steps
Build the browser CoreCLR runtime, libraries, host, packs, and host crossgen2. This was reproduced on runtime commit
798449390515fa02f4b20160bedc5e34f8fbdfb9with the publishing prerequisites from #133378 at245cb70d593f2c8f3a4e23bcc422e7da5926e15b. Enable the existing iOSILLink.Descriptors.iOS.xmlfor browser aggressive trimming inSystem.Runtime.Tests, and remove the stale.ilprojLinkmetadata from itsTestILAssemblyproject reference so VFS staging succeeds.XHARNESS_COMMAND=test-browser ./dotnet.sh build /t:Test \ src/libraries/System.Runtime/tests/System.Runtime.Tests/System.Runtime.Tests.csproj \ /p:TargetOS=browser /p:TargetArchitecture=wasm /p:RuntimeFlavor=CoreCLR /p:Configuration=Release \ /p:PublishReadyToRun=true /p:EnableAggressiveTrimming=true \ /p:Scenario=WasmTestOnChrome /p:InstallChromeForTests=true /p:XunitShowProgress=true \ '/p:WasmTestAppArgs=-method System.Tests.ArrayTests.BinarySearch_TypesNotIComparable_ThrowsInvalidOperationException'Use clean project-specific
browser-wasmobj/bin outputs when switchingPublishReadyToRuntofalse; otherwise stale staging can cause an unrelatedSystem.Runtimeassembly-load failure.The existing theory exercises non-generic and generic
Array.BinarySearchoverloads. Its failing data row uses two distinctobjectinstances; the comparer exception is expected to be wrapped inInvalidOperationException. The precise failing overload has not yet been isolated.Expected behavior
All four existing data rows pass, as they do with aggressive trimming enabled and R2R disabled.
Actual behavior
R2R discovers the theory, executes its
Int32row, starts itsObjectrow, and terminates:No managed assertion failure is reported. With R2R disabled, the clean trimmed run reports
Tests run: 4 Passed: 4 Failed: 0 Skipped: 0.Regression?
Unknown. The observed distinction is R2R on versus off with trimming retained, not an older-versus-newer runtime comparison.
Known Workarounds
Disable R2R for the application. A narrowly scoped browser-R2R ActiveIssue can quarantine this theory during library-test bring-up without disabling interpreter coverage.
Configuration
Browser-wasm CoreCLR Release, macOS arm64 build host, Chromium 153.0.8010.0, bootstrap SDK 11.0.100-rc.1.26420.103. The served CoreLib contains a nonzero R2R table.
Other information
Related to library-test bring-up #133193. #133547 fixes a potentially related catch-resumption GC-mode bug, but has not been tested against this reproduction and is not established as its fix.
Note
This issue was generated by GitHub Copilot from local build and test results.