http://bugs.winehq.org/show_bug.cgi?id=58983
Bug ID: 58983 Summary: Wow64 applications crash when initializing WinMM Product: Wine Version: 10.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winealsa.drv Assignee: wine-bugs@list.winehq.org Reporter: matthewm.hinson@gmail.com Distribution: ---
Created attachment 79705 --> http://bugs.winehq.org/attachment.cgi?id=79705 Stacktrace
If a Wow64 application initializes WinMM by (for example) calling waveOutGetNumDevs(), it will crash with an access violation. The reason is that the structure "is_format_supported_params" has a different definition in mmdevapi.dll than it does in winealsa.drv:
https://gitlab.winehq.org/wine/wine/-/blob/18ce7964203b486c8236f2c16a370ae27...
https://gitlab.winehq.org/wine/wine/-/blob/18ce7964203b486c8236f2c16a370ae27...
winealsa.drv has an extra field "fmt_out" which shifts the field "result" down by 4 bytes. As a result, winealsa ends up writing the result outside of the DLL-allocated buffer, clobbering a stack-saved register which then later causes the crash.
To reproduce, simply compile the following as a 32-bit .exe:
#include <windows.h>
int main() { waveOutGetNumDevs(); return 0; }
Then run on a 64-bit Wine prefix.
http://bugs.winehq.org/show_bug.cgi?id=58983
--- Comment #1 from matthewm.hinson@gmail.com --- Created attachment 79706 --> http://bugs.winehq.org/attachment.cgi?id=79706 Reproduction .exe
http://bugs.winehq.org/show_bug.cgi?id=58983
--- Comment #2 from Rafał Mużyło galtgendo@o2.pl --- Thanks for the info.
Going by bug 58971, you're correct.
http://bugs.winehq.org/show_bug.cgi?id=58983
Andrew Nguyen arethusa26@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Andrew Nguyen arethusa26@gmail.com --- A fix for bug 58971 has been merged to master, so I'll resolve this bug as a duplicate.
*** This bug has been marked as a duplicate of bug 58971 ***