https://bugs.winehq.org/show_bug.cgi?id=48019
Bug ID: 48019 Summary: SSE register MXCSR is wrong for new threads Product: Wine Version: 4.15 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: mterrisse@free.fr Distribution: ---
Created attachment 65554 --> https://bugs.winehq.org/attachment.cgi?id=65554 Command line executable with source code to get MXCSR in a new created thread
Hello,
I am running Wine 4.15 64 bits (PlayOnLinux) on Ubuntu 19.10 (More recent versions of Wine are not available yet).
On Windows when a new thread is created (CreateThread), the value of the SSE register MXCSR is initialized to 0x1f80. But for Wine 4.15 on Ubuntu, it is initialized to 0x1920.
This is fatal for our programs that use libcef.dll (Chromium Embedded Framework), this library creates new renderer threads, doesn't set the MXCSR register (so exceptions due to denormalization of floats are not masked), then there is an unhandled exception and the whole program crashes.
I tested with Wine 4.18 on macOS 10.15.1 Catalina, I get the correct value 0x1f80, and indeed there is no crash on macOS. So this is specific to Wine on Linux (except is something has changed between Wine 4.15 and Wine 4.18).
Here attach you can find a command line executable with source code (Delphi) that displays the value of MXCSR for a new thread.
Thank you for your help. Regards,
Michel Terrisse
https://bugs.winehq.org/show_bug.cgi?id=48019
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEEDINFO
--- Comment #1 from Ken Sharp imwellcushtymelike@gmail.com --- (In reply to Michel Terrisse from comment #0)
I am running Wine 4.15 64 bits (PlayOnLinux)
PoL is NOT supported here. Compile Wine from the original source code and try again.
https://bugs.winehq.org/show_bug.cgi?id=48019
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com Status|NEEDINFO |NEW
--- Comment #2 from Zebediah Figura z.figura12@gmail.com --- (In reply to Ken Sharp from comment #1)
(In reply to Michel Terrisse from comment #0)
I am running Wine 4.15 64 bits (PlayOnLinux)
PoL is NOT supported here. Compile Wine from the original source code and try again.
Well, this is true, but I suspect the original diagnosis is nevertheless correct We don't set the MXCSR.
https://bugs.winehq.org/show_bug.cgi?id=48019
--- Comment #3 from Michel Terrisse mterrisse@free.fr --- Hello,
Sorry I wrote 0x1920 in the description instead of 0x1900.
I tested again with "pure" wine (sudo apt install wine64-development, wine 4.17-1), and I have the same problem, MXCSR is 0x1900 instead of 0x1f80 when a new thread begins.
Regards,
Michel Terrisse
https://bugs.winehq.org/show_bug.cgi?id=48019
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |0b2e65f53aeb4fbda660828ad06 | |bff554fccb1d5 Status|NEW |RESOLVED
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- It should be fixed by 0b2e65f53aeb4fbda660828ad06bff554fccb1d5.
https://bugs.winehq.org/show_bug.cgi?id=48019
--- Comment #5 from Michel Terrisse mterrisse@free.fr --- Thank you very much for the fix.
Best regards,
Michel Terrisse
https://bugs.winehq.org/show_bug.cgi?id=48019
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 4.20.