https://bugs.winehq.org/show_bug.cgi?id=49643
Bug ID: 49643 Summary: Calling ClipCursor too frequently can cause stack overflow in foreground window thread. Product: Wine Version: 5.13 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winex11.drv Assignee: wine-bugs@winehq.org Reporter: rbernon@codeweavers.com Distribution: ---
Created attachment 67845 --> https://bugs.winehq.org/attachment.cgi?id=67845 Reproducing sample application
Calling ClipCursor too frequently in a non-foreground thread may cause the foreground window thread to overflow its stack. This is happening under some circumstances with CoD: WWII.
This is inherent to the current implementation where every ClipCursor request from a non-foreground thread involves synchronously sending internal messages to the foreground window thread, then to the desktop thread. Each ClipCursor request is processed when the desktop thread is notified, growing the stack every time, until it overflows.
The attached program can be used to easily reproduce the issue.