https://bugs.documentfoundation.org/show_bug.cgi?id=105735
--- Comment #9 from Noel Grandin <noelgran...@gmail.com> ---
pasting the IRC conversation here we had back then:
Jan 09 11:58:58 <moggi> sberg: <noelgrandin> I have a fix coming for the
tinderbox failures, in case anyone else is looking at it <noelgrandin> very
entertaining, looks like we were always returning a 64-bit time value in a
32-bit field, and now time has marched on, and we exceed the boundaries
Jan 09 11:59:30 <tml_> is the tinderbox in question a Windows one?
Jan 09 11:59:41 <noelgrandin> sberg,
https://gerrit.libreoffice.org/#/c/32879/
Jan 09 11:59:43 <IZBot> gerrit: »[API CHANGE] return unsigned 64-bit value
from GetSystemTicks in basic code« by Noel Grandin for master [NEW]
Jan 09 11:59:45 <tml_> on Windows that GetSystemTicks() uses an epoch that
probably is the boot time
Jan 09 11:59:46 <sberg> moggi, ah, see my temporary removal of that test code a
few lines above
Jan 09 12:00:45 <sberg> tml_, and on non-Windows it uses some world-global
value?
Jan 09 12:02:00 <tml_> sberg: the Unix epoch
Jan 09 12:03:19 <tml_> (and the time since the Unix epoch, in milli-seconds,
surely has passed the limits of a 32-bit int long ago?)
Jan 09 12:04:04 <tml_> so probably that GetSystemTicks() has never worked
"correctly" on Unix?
Jan 09 12:06:05 <tml_> while on Windows it has worked for a bit over a month
after a boot?
Jan 09 12:06:09 <tml_> just guesstimating
Jan 09 12:07:19 <sberg> tml_, so it looks like lower 32-bit part of Unix epoch
happened to turn "negative" yesterday and was "positive" on Friday---just in
time for that commit :)
Jan 09 12:07:41 <tml_> how often does it switch sign?
Jan 09 12:08:26 <tml_> lower 32 bit of Unix epoch times 1000, you mean; as
seconds it still fits into 31 bits
Jan 09 12:09:09 <sberg> would switch every 2^31 seconds
So the fact that this basic function "works" is just that it's mostly lucky -
it's almost always either positive or negative for the duration of the basic
program.
If the basic program was unlucky enough to run during a transition, it would
generate an incorrect result when performing calculation on those values.
I think our best bet here to fix the basic program and this regression is
(a) revert that API CHANGE on master and on the branch
(b) on master change tools::GetSystemTicks to
(i) use application startup as the epoch
(ii) return a signed 32-bit value to make it obvious what our requirement is
(and document why)
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs