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.