http://bugs.winehq.org/show_bug.cgi?id=60110 Bug ID: 60110 Summary: AiCube-ISP v6.96Z: crashes (stack overflow) when selecting MCU type from dropdown Product: Wine Version: 11.14 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: comctl32 Assignee: wine-bugs@list.winehq.org Reporter: nong24@qq.com Target Milestone: --- Distribution: --- Created attachment 81664 --> http://bugs.winehq.org/attachment.cgi?id=81664 Terminal output from wine-staging 11.14 showing the stack overflow crash AiCube-ISP v6.96Z is a 32-bit MFC application (STC MCU ISP flashing tool). On Wine, it crashes with a stack overflow when selecting "AI8051U-34K64" from the MCU Type dropdown. Reproduction: 1. Download: https://www.stcaimcu.com/data/download/Tools/AiCube-ISP-v6.96Z.zip SHA1: 7197cf62a010fbc5b1191284113a4f3818438621 2. Install and run with Wine. A native mfc42.dll from Windows is needed (taken from Windows XP, SHA1: 0154c5ff2612780d70319d88a28a8e43db2e6b10) since Wine does not include an MFC implementation. 3. Select "AI8051U-34K64" from the MCU Type dropdown. 4. Wine crashes immediately with "Unhandled stack overflow". Confirmed on both wine-staging 11.14 and plain wine 11.14 (built from source). The bug is in upstream Wine's comctl32, not staging-specific. Root cause: Wine's DefSubclassProc (dlls/comctl32/commctrl.c) has no recursion limit. When a subclassed window procedure re-enters SetWindowText in response to WM_SETTEXT, the recursion continues unbounded until stack overflow. Windows bounds this recursion to about 15 levels. A conformance test is attached that reproduces the issue without requiring mfc42.dll or the application, using only Wine's comctl32 subclassing API. The test shows Wine reaches the recursion guard (50) while Windows bounds it (~15). Terminal outputs from both wine-staging and plain wine are attached, along with a screenshot showing the dropdown selection that triggers the crash. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.