http://bugs.winehq.org/show_bug.cgi?id=20313
Summary: Patch "user32: Draw the whole button only if requested" caused uninitialized memory use Product: Wine Version: 1.1.27 Platform: PC URL: http://source.winehq.org/git/wine.git/?a=commit;h=8d54 f582776d590b236e288f9ef8085bb221ccab OS/Version: Linux Status: NEW Keywords: download, regression, source Severity: normal Priority: P2 Component: user32 AssignedTo: dmitry@codeweavers.com ReportedBy: dank@kegel.com CC: wine-bugs@winehq.org
Running the ntdll tests under valgrind, I get a crash. Because I also happen to have visual studio 2005 installed, I got a handy crash dialog offering to debug. That dialog seemed to cause the following valgrind error:
Conditional jump or move depends on uninitialised value(s) at IsRectEmpty (uitools.c:1282) by IntersectRect (uitools.c:1331) by PB_Paint (button.c:880) by paint_button (button.c:207) by ButtonWndProc_common (button.c:450) by ButtonWndProcW (button.c:564) ... by SetFocus (focus.c:293) by ButtonWndProc_common (button.c:336) by ButtonWndProcW (button.c:564) ... Uninitialised value was created by a stack allocation at PB_Paint (button.c:802)
Either adding the line memset(&focus_rect, 0, sizeof(focus_rect)); at the top of PB_Paint, or reverting the patch http://source.winehq.org/git/wine.git/?a=commit;h=8d54f582776d590b236e288f9e... makes the warning go away. Evidently that patch jumped over the initialization of that variable when it shouldn't have...
http://bugs.winehq.org/show_bug.cgi?id=20313
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #1 from Dan Kegel dank@kegel.com 2009-10-10 15:28:36 --- Assigned to Dmitry, since he wrote the patch...
http://bugs.winehq.org/show_bug.cgi?id=20313
--- Comment #2 from Dmitry Timoshkov dmitry@codeweavers.com 2009-10-11 23:35:30 --- Created an attachment (id=24046) --> (http://bugs.winehq.org/attachment.cgi?id=24046) Make sure that focus_rect is always initialized
Does the attached patch help?
http://bugs.winehq.org/show_bug.cgi?id=20313
--- Comment #3 from Dan Kegel dank@kegel.com 2009-10-12 08:06:55 --- Yes, that gets rid of the warnings.
http://bugs.winehq.org/show_bug.cgi?id=20313
--- Comment #4 from Dmitry Timoshkov dmitry@codeweavers.com 2009-10-12 08:49:44 --- Thanks for testing I sent the patch.
http://bugs.winehq.org/show_bug.cgi?id=20313
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED
--- Comment #5 from Dmitry Timoshkov dmitry@codeweavers.com 2009-10-12 21:30:04 --- The patch has been committed.
http://bugs.winehq.org/show_bug.cgi?id=20313
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2009-10-23 13:19:33 --- Closing bugs fixed in 1.1.32.