shared/calendarspec: abort calculation after 1000 iterations
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 21 Mar 2021 19:59:32 +0000 (20:59 +0100)
committerCarlos Henrique Lima Melara <charlesmelara@riseup.net>
Thu, 26 Jun 2025 00:44:53 +0000 (21:44 -0300)
commitac44989c1058a1efcd9f30a21874876330a75edd
treed803151e5e9b54fb0c63e077d64bdd79ec8ee554
parent0ee7222fa31112605752431e82e0186bbf2cbd31
shared/calendarspec: abort calculation after 1000 iterations

We have a bug where we seem to enter an infinite loop when running in the
Europe/Dublin timezone. The timezone is "special" because it has negative SAVE
values. The handling of this should obviously be fixed, but let's use a
belt-and-suspenders approach, and gracefully fail if we fail to find an answer
within a specific number of attempts. The code in this function is rather
complex, and it's hard to rule out another bug in the future.

(cherry picked from commit 169615c9a8cdc54d748d4dfc8279be9b3c2bec44)

Gbp-Pq: Name shared-calendarspec-abort-calculation-after-1000-iteratio.patch
src/shared/calendarspec.c