-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mono][wasm] System.Numerics.Vectors.Tests assert equal failure #84775
Comments
Tagging subscribers to this area: @directhex Issue DetailsBuild InformationBuild: https://dev.azure.com/dnceng-public/public/_build/results?buildId=237850&view=results Error MessageFill the error message using known issues guidance. {
"ErrorMessage": "[FAIL] System.Numerics.Tests.GenericVectorTests.BitwiseAndOperatorUInt64",
"BuildRetry": false,
"ErrorPattern": "",
"ExcludeConsoleLog": false
}
|
Looking at the log, the tests actually seem to generate the right values. Could the equality operator be broken? I had a similar problem in https://github.com/dotnet/runtime/pull/83515/files where |
Is this a random failure ? |
As far as I know simd operations on WASM are supposed to produce all 1-bits for true and all 0-bits for false, anything else is incorrect: https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#operations |
Also I should note any time NaNs come into play the actual bits of those floats are unspecified in wasm, so doing bitwise comparisons on float vectors is incorrect on WASM and you need to specifically do f32/f64 compares. But it doesn't look like that would be happening here. |
Testcase:
Add to csproj:
This seems to only happen in mixed mode, |
The problem seems to occur when the interpreter makes a call to the AOT-ed Vector.Equals (Vector) method, the argument offset seems to be off, i.e. it doesn't point to the <1, 2, 3, 4> data on the stack. Maybe because Vector has 16 byte alignment, and an interpreter stack val is only 8 bytes ? |
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsBuild InformationBuild: https://dev.azure.com/dnceng-public/public/_build/results?buildId=237850&view=results Error log
Error MessageFill the error message using known issues guidance. {
"ErrorMessage": "Program terminated with exit",
"BuildRetry": false,
"ErrorPattern": "",
"ExcludeConsoleLog": false
} Report
Summary
|
This is breaking rolling builds since Apr 14 - https://dev.azure.com/dnceng-public/public/_build/results?buildId=242119&view=results . The changes since the previous rolling build were - e3a80f3...3182dfb . |
Normally the arg should have been aligned, I'll take a look |
Someone else might want to look into this, but on latest main this no longer repros for me locally. I reproed it about 15 minutes ago on my SIMD branch and then rebased onto latest main and now it passes. So it may have been related to dedup? |
Yes, this 693663b hides the bug, but it should still be reproducible if its reverted. |
No recent failures have been reported, so I will close this issue. |
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=237850&view=results
Build error leg or test failing: System.Numerics.Vectors.Tests
Pull request: #84304
Error log
Error Message
Fill the error message using known issues guidance.
Report
Summary
The text was updated successfully, but these errors were encountered: