Repository navigation
Description
Description
The trimmed browser-wasm CoreCLR ReadyToRun library-test lane exposes four generic-math double.Max/double.Min cases where the selected NaN operand's sign/payload is not preserved. The assertion output renders both values as NaN, but the bitwise comparison detects that the result differs from the expected operand.
This resembles #133311, but that issue is explicitly scoped to Mono browser-wasm. This issue tracks the distinct CoreCLR ReadyToRun configuration so its quarantine and re-enable condition are independent.
Reproduction Steps
Run System.Runtime.Tests using browser-wasm CoreCLR with trimmed ReadyToRun images:
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:TestWasmReadyToRun=true /p:EnableAggressiveTrimming=true \
/p:Scenario=WasmTestOnChrome /p:InstallChromeForTests=trueThe affected member-data rows are the positive/negative NaN payload cases in MaxDouble and MinDouble from src/libraries/Common/tests/System/GenericMathTestMemberData.cs.
Expected behavior
double.Max and double.Min return the selected NaN operand with its sign and payload preserved, matching the generic-math test expectations.
Actual behavior
Four rows fail because the returned NaN has different bits from the expected NaN operand:
MaxDouble: positive NaN with-0.0MaxDouble:-0.0with negative NaNMinDouble: positive NaN with-0.0MinDouble:-0.0with negative NaN
Regression?
Unknown. The new full trimmed ReadyToRun library sweep first exposed the behavior.
Known Workarounds
Temporarily omit only these four member-data rows when PlatformDetection.IsWasmReadyToRun is true.
Configuration
- Runtime: CoreCLR
- Target: browser-wasm
- Mode: ReadyToRun with aggressive trimming
- Browser: Chrome
- Architecture: wasm32
Other information
Related Mono-specific issue: #133311.
Note
This issue was created by GitHub Copilot based on locally reproduced CI evidence.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
dotnet-policy-service commentedon Sep 19, 2026
Tagging subscribers to this area: @dotnet/crossgen-contrib
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Sep 19, 2026
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.
lewing commentedon Sep 19, 2026
cc @tannergooding
dotnet-policy-service commentedon Sep 19, 2026
Tagging subscribers to this area: @dotnet/crossgen-contrib
See info in area-owners.md if you want to be subscribed.
Allow platform NaN canonicalization in floating-point assertions (#13…