https://bugs.winehq.org/show_bug.cgi?id=53005
Bug ID: 53005 Summary: quartz:systemclock Fails after timeGetTime() wraps Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: quartz Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
Created attachment 72373 --> https://bugs.winehq.org/attachment.cgi?id=72373 Use GetTickCount64() instead of timeGetTime() in quartz:systemclock
quartz:systemclock fails on fg-deb64:
systemclock.c:186: Test failed: Got timestamps 43062836670000, 113163710000, 43062836670000.
https://test.winehq.org/data/patterns.html#quartz:systemclock
The issue is that timeGetTime() wrapped after 49.71 days (2^32 milliseconds) of uptime, causing it to no longer match the values returned by IReferenceClock_GetTime().
The test started using timeGetTime() in the commit below:
commit bf5b35f19b841e6352c32ca7c6671d9172636871 Author: Zebediah Figura zfigura@codeweavers.com AuthorDate: Thu Oct 21 12:41:11 2021 -0500
quartz: Use the performance counter for the system clock.
Native probably uses timeGetTime() as a source. That doesn't actually match the performance counter on Windows, but it does on Wine, and accessing the counter directly is slightly more efficient anyway.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51684 Signed-off-by: Zebediah Figura zfigura@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
The commit made two changes: GetTickCount*() -> timeGetTime() in the test GetTickCount64() -> QueryPerformanceCounter() in SystemClockImpl_GetTime()
Before this commit the test was failing on Windows because the GetTickCount*() values and SystemClockImpl_GetTime() were a bit out of sync. So while switching to GetTickCount64() in the test fixes the issue in Wine and does not seem to cause failures on Windows it's not clear that this is correct either.
It would also be nice to see what happens to this test on Windows after 49.7 days of uptime.
https://bugs.winehq.org/show_bug.cgi?id=53005
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression, source, | |testcase Regression SHA1| |bf5b35f19b841e6352c32ca7c66 | |71d9172636871
https://bugs.winehq.org/show_bug.cgi?id=53005
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=53005
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Version|unspecified |6.20 Fixed by SHA1| |2a44723d4dbea74892d6eee1c8b | |a463a1f38d014
--- Comment #1 from Zeb Figura z.figura12@gmail.com --- Fixed by https://source.winehq.org/git/wine.git/commitdiff/2a44723d4dbea74892d6eee1c8ba463a1f38d014.
https://bugs.winehq.org/show_bug.cgi?id=53005
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.10.
https://bugs.winehq.org/show_bug.cgi?id=53005
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |7.0.x
https://bugs.winehq.org/show_bug.cgi?id=53005
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|7.0.x |---
--- Comment #3 from Michael Stefaniuc mstefani@winehq.org --- Removing the 7.0.x milestone from bug fixes included in 7.0.2.