http://bugs.winehq.org/show_bug.cgi?id=23707
Summary: stack overflow when destroying a window whose owner is itself Product: Wine Version: 1.2 Platform: x86 OS/Version: Linux Status: NEW Keywords: download, source, testcase Severity: normal Priority: P2 Component: user32 AssignedTo: wine-bugs@winehq.org ReportedBy: madewokherd@gmail.com
Created an attachment (id=29697) --> (http://bugs.winehq.org/attachment.cgi?id=29697) testcase (C source)
File this one under "crazy situations created by the mono test suite".
If you create a window, change its parent to itself (using SetWindowLong[Ptr] with GWL[P]_HWNDPARENT), and then destroy the window, DestroyWindow recurses infinitely and causes a stack overflow.
Test case attached.
http://bugs.winehq.org/show_bug.cgi?id=23707
--- Comment #1 from Vincent Povirk madewokherd@gmail.com 2010-07-18 18:00:42 --- Created an attachment (id=29698) --> (http://bugs.winehq.org/attachment.cgi?id=29698) testcase (executable)
http://bugs.winehq.org/show_bug.cgi?id=23707
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=23707
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|madewokherd@gmail.com | Severity|normal |minor
--- Comment #2 from Dmitry Timoshkov dmitry@codeweavers.com 2010-07-19 05:51:29 --- I'd say that noone in their right mind would create such code -> minor.
http://bugs.winehq.org/show_bug.cgi?id=23707
--- Comment #3 from Dmitry Timoshkov dmitry@codeweavers.com 2010-07-19 05:55:02 --- Wine does a proper check in SetParent() but misses one in SetWindowLong/ GWL_HWNDPARENT. Does the SetWindowLong() really succeed?
http://bugs.winehq.org/show_bug.cgi?id=23707
--- Comment #4 from Dmitry Timoshkov dmitry@codeweavers.com 2010-07-19 05:55:29 --- ... under Windows of course.
http://bugs.winehq.org/show_bug.cgi?id=23707
--- Comment #5 from Dmitry Timoshkov dmitry@codeweavers.com 2010-07-19 06:12:10 --- (In reply to comment #3)
Wine does a proper check in SetParent() but misses one in SetWindowLong/ GWL_HWNDPARENT.
Or rather test in SetParent() is not complete.
http://bugs.winehq.org/show_bug.cgi?id=23707
--- Comment #6 from Vincent Povirk madewokherd@gmail.com 2010-07-19 08:50:26 --- Sorry, the GWLP_HWNDPARENT naming is rather confusing, and my description didn't help.
GWLP_HWNDPARENT actually sets a window's owner, not it's parent, which makes it completely different from the SetParent function.
The testcase does not crash on Windows, but I have not verified that the owner is really being set.
http://bugs.winehq.org/show_bug.cgi?id=23707
--- Comment #7 from Dmitry Timoshkov dmitry@codeweavers.com 2010-08-04 05:52:21 --- Patch sent: http://www.winehq.org/pipermail/wine-patches/2010-August/091816.html
http://bugs.winehq.org/show_bug.cgi?id=23707
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #8 from Dmitry Timoshkov dmitry@codeweavers.com 2010-08-05 04:57:56 --- The patch has been committed: http://source.winehq.org/git/wine.git/?a=commitdiff;h=dfe6ae58afdebd830fa491...
http://bugs.winehq.org/show_bug.cgi?id=23707
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org 2010-08-20 12:39:28 --- Closing bugs fixed in 1.3.1.
http://bugs.winehq.org/show_bug.cgi?id=23707
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.2.x
http://bugs.winehq.org/show_bug.cgi?id=23707
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.2.x |---
--- Comment #10 from Alexandre Julliard julliard@winehq.org 2010-10-08 10:40:12 CDT --- Removing 1.2.x milestone from bugs fixed in 1.2.1.