https://bugs.winehq.org/show_bug.cgi?id=53703
Bug ID: 53703 Summary: Crashes when setting a long window title. Product: Wine Version: 7.17 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: sagawa.aki+winebugs@gmail.com Distribution: Ubuntu
Created attachment 73120 --> https://bugs.winehq.org/attachment.cgi?id=73120 minimal reproducible example
After Wine 7.16, setting a long window title leads crashes. I debugged this issue and created a minimum reproducible example.
Steps to reproduce: 1. Using winecfg, enable "Emulate a virtual desktop" or uncheck "Allow the window manager to decorate the windows". 2. Compile attached source file, e.g. % x86_64-w64-mingw32-gcc -o set_long_win_title.exe set_long_win_title.c -lgdi32 3. Launch the program with wine, i.e. wine set_long_win_title.exe 4. Click inside the window.
Expected result: The window title changes to "xxxxxx..." (a string of 179 x's).
Actual result: It crashes with the following message: 011c:err:virtual:virtual_setup_exception stack overflow 1808 bytes in thread 011c addr 0x7fae1e3a0a8c stack 0x4608f0 (0x460000-0x461000-0x660000)
https://bugs.winehq.org/show_bug.cgi?id=53703
--- Comment #1 from Sagawa sagawa.aki+winebugs@gmail.com --- Created attachment 73121 --> https://bugs.winehq.org/attachment.cgi?id=73121 WINEDEBUG=win,seh,msg,message
https://bugs.winehq.org/show_bug.cgi?id=53703
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression, source Regression SHA1| |0ad2db66a109b4c0a46d04ff823 | |1706fff540941
--- Comment #2 from Sagawa sagawa.aki+winebugs@gmail.com --- git bisect shows the following result: 0ad2db66a109b4c0a46d04ff8231706fff540941 is the first bad commit commit 0ad2db66a109b4c0a46d04ff8231706fff540941 Author: Jacek Caban jacek@codeweavers.com Date: Sun Aug 14 20:49:53 2022 +0200
win32u: Pack messages sent directly from win32u.
Instead of leaking kernel pointers.
dlls/win32u/message.c | 216 +++++++++++++++++++++++++++++++++++++++++-- dlls/win32u/ntuser_private.h | 9 -- 2 files changed, 208 insertions(+), 17 deletions(-)
https://bugs.winehq.org/show_bug.cgi?id=53703
--- Comment #3 from Sagawa sagawa.aki+winebugs@gmail.com --- Created attachment 73122 --> https://bugs.winehq.org/attachment.cgi?id=73122 proposed patch
https://bugs.winehq.org/show_bug.cgi?id=53703
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Crashes when setting a long |Wine crashes when setting a |window title. |long window title.
https://bugs.winehq.org/show_bug.cgi?id=53703
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=53703
Jacek Caban jacek@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |cb0e4f5f4f7dc10a0933349ad78 | |0a11405cd736e CC| |jacek@codeweavers.com
--- Comment #4 from Jacek Caban jacek@codeweavers.com --- Fixed in git, thanks! https://gitlab.winehq.org/wine/wine/-/commit/cb0e4f5f4f7dc10a0933349ad780a11...
https://bugs.winehq.org/show_bug.cgi?id=53703
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.18.