http://bugs.winehq.org/show_bug.cgi?id=28741
Bug #: 28741 Summary: Odd coordinate in hit test causes uninitialized value references in MONTHCAL_CalculateDayOfWeek()? Product: Wine Version: 1.3.30 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: comctl32 AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com Classification: Unclassified
Running "make monthcal.ok" in comctl32/tests with Valgrind reports:
Conditional jump or move depends on uninitialised value(s) at __moddi3 (in dlls/ntdll/ntdll.dll.so) by RtlTimeToTimeFields (time.c:126) by FileTimeToSystemTime (time.c:858) by MONTHCAL_CalculateDayOfWeek (monthcal.c:469) by MONTHCAL_GetMonth (monthcal.c:486) by MONTHCAL_HitTest (monthcal.c:498) by MONTHCAL_WindowProc (monthcal.c:2861) by ??? (in /oldhome/dank/wine-git/dlls/user32/user32.dll.so) by call_window_proc (winproc.c:242) by WINPROC_CallProcAtoW (winproc.c:601) by CallWindowProcA (winproc.c:960) by monthcal_subclass_proc (monthcal.c:566) by ??? (in dlls/user32/user32.dll.so) by call_window_proc (winproc.c:242) by WINPROC_call_window (winproc.c:908) by call_window_proc (message.c:2211) by send_message (message.c:3084) by SendMessageA (message.c:3286) by test_hittest (monthcal.c:1042) by func_monthcal (monthcal.c:1957) by run_test (test.h:556) by main (test.h:624) Uninitialised value was created by a stack allocation at MONTHCAL_CalculateDayOfWeek (monthcal.c:462)
Something seems to be creating an out of range date; then when MONTHCAL_CalculateDayOfWeek() converts to (and then back from) a different time representation, the conversion fails, leading to use of garbage.
My guess is that test_hittest() is picking some area to hittest that is driving the code bonkers. We get lucky, and the test passes anyway. I don't know if a real hittest could give the wrong answer in some situations.
https://bugs.winehq.org/show_bug.cgi?id=28741
--- Comment #1 from Austin English austinenglish@gmail.com --- Still in git.
https://bugs.winehq.org/show_bug.cgi?id=28741
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase, | |valgrind
https://bugs.winehq.org/show_bug.cgi?id=28741
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 48700 --> https://bugs.winehq.org/attachment.cgi?id=48700 patch
I can't see the error here but I think this patch may help.
https://bugs.winehq.org/show_bug.cgi?id=28741
--- Comment #3 from Austin English austinenglish@gmail.com --- (In reply to Bruno Jesus from comment #2)
Created attachment 48700 [details] patch
I can't see the error here but I think this patch may help.
Yep, works here, thanks!
https://bugs.winehq.org/show_bug.cgi?id=28741
--- Comment #4 from Austin English austinenglish@gmail.com --- (In reply to Bruno Jesus from comment #2)
Created attachment 48700 [details] patch
I can't see the error here but I think this patch may help.
Bruno, would you mind resubmitting this patch?
https://bugs.winehq.org/show_bug.cgi?id=28741
--- Comment #5 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Austin English from comment #4)
(In reply to Bruno Jesus from comment #2)
Created attachment 48700 [details] patch
I can't see the error here but I think this patch may help.
Bruno, would you mind resubmitting this patch?
Sorry, it was rejected. No other idea how to fix this for now.
https://bugs.winehq.org/show_bug.cgi?id=28741
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |9231452a9c064fa085733befd28 | |3025d2133f13b
--- Comment #6 from Nikolay Sivov bunglehead@gmail.com --- Fixed with 9231452a9c064fa085733befd283025d2133f13b.
https://bugs.winehq.org/show_bug.cgi?id=28741
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 2.16.
https://bugs.winehq.org/show_bug.cgi?id=28741
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.0.x
https://bugs.winehq.org/show_bug.cgi?id=28741
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.0.x |---
--- Comment #8 from Michael Stefaniuc mstefani@winehq.org --- Removing the 2.0.x milestone from bugs included in 2.0.4.