https://bugs.winehq.org/show_bug.cgi?id=45289
Bug ID: 45289 Summary: Wine Crashes Some Programs If Compiled with AVX Support Product: Wine Version: 3.9 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: ben@xnode.org Distribution: ---
This is a really specific bug and I'm not sure what other programs/games it affects. I assume there are more, but this is the only example that I've reliably run into at the moment:
== To Recreate Run Cemu under a 64bit Prefix. Start Mario Kart 8. After Mario announces the game, it will crash.
== Workaround Compiling Wine without AVX support (i.e. adding the -mno-avx C/XXFLAG) negates the issue.
People won't see this when using distro packages because they'll be compiled using something like -march=x86-64 which doesn't enable any of the AVX options (as they aren't available in all processors). If you compile it yourself using something like -march=native then GCC will enable the AVX functions which in turn triggers this issue.
I saw this behaviour on both my old i7-5775C and the i7-8700K which has since replaced it.
In case it's relevant, it looks like this problem may have not existed before Wine 3.0 because I've tracked down an old post of my own wherein I stated (regarding the Mario Kart 8 crash on Cemu):
======================= Tried on a brand new Wine 3.2 prefix, same issue (Segmentation fault after the splash screen). Works fine with Staging 2.21.
More specifically: 002c:fixme:seh:RtlCaptureStackBackTrace (0, 40, 0x25152ba0, (nil)) stub! 002c:err:seh:call_stack_handlers invalid frame 25153728 (0x116a0000-0x117a0000) 002c:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception
EDIT: The issue was vcrun2015. Wine-staging didn't need it. Standard wine does, for some reason. =======================
Not sure if the vcrun2015 issue was a red-herring as that's installed now but no-longer fixes the issue.
https://bugs.winehq.org/show_bug.cgi?id=45289
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #1 from Zebediah Figura z.figura12@gmail.com --- I guess this is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49001.
https://bugs.winehq.org/show_bug.cgi?id=45289
--- Comment #2 from Benjamin Hodgetts ben@xnode.org --- Could be. I forgot to mention before that I'm using GCC 8.1 in this example.
https://bugs.winehq.org/show_bug.cgi?id=45289
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45289
--- Comment #3 from Benjamin Hodgetts ben@xnode.org --- So to clarify the problem here, do we think the issue is with GCC, Wine, Cemu or all of the above?
I'm not sure if there are any other caveats to disabling AVX support at compile-time in Wine but at the moment it's the only way to negate the issue.
For reference, the problem still exists as of Wine 3.15, GCC 8.2.1 and Cemu 1.13.1d.
https://bugs.winehq.org/show_bug.cgi?id=45289
Celeste Liu coelacanthus@outlook.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |coelacanthus@outlook.com
https://bugs.winehq.org/show_bug.cgi?id=45289
Marcus Seyfarth m.seyfarth@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |m.seyfarth@gmail.com
--- Comment #4 from Marcus Seyfarth m.seyfarth@gmail.com --- This AVX bug is still relevant five years later with the current mingw-gcc toolchains (verified with 12.3.1 but most probably also 13.2.1), in late 2023. I've tested it with Call of Juarez: Gunslinger which is a 32-bit game, and when compiled with AVX, it won't start up.
Some distros recently started to offer x86-64-v3 packages which use AVX and AVX2 by default. To extract the last bit of performance on these setups, it would be therefore great to fix the remaining AVX issues to offer a fully-working optimized package.
https://bugs.winehq.org/show_bug.cgi?id=45289
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45289
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexhenrie24@gmail.com See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=55007, | |https://bugs.winehq.org/sho | |w_bug.cgi?id=55899
--- Comment #5 from Alex Henrie alexhenrie24@gmail.com --- Is this still an issue in Wine 9.0 and later, or did https://gitlab.winehq.org/wine/wine/-/commit/4b458775bb8c9492ac859cfd167c5f5... fix it?
https://bugs.winehq.org/show_bug.cgi?id=45289
Gabriel Ravier gabravier@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gabravier@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45289
--- Comment #6 from Marcus Seyfarth m.seyfarth@gmail.com --- I've just compiled the latest proton-cachyos from 31st of August 2024 with my own mingw-13.3.1 toolchain from late August 2024 and made sure that the PKGBUILD and Makefile.in was cleared of -mno-avx/-mno-avx2 (which is used by default). It seems to work now, I've tested Call of Juarez: Gunslinger which refused to work before.