[PROPOSED] GNOME glib bug fix installed
The bug fix was merged into glib master today. Since it’s four years after the fix was proposed (!), push back an estimate of when we can remove the workaround. Also, adjust to GNOME bug renumbering. * NEWS: Adjust bug number in history. * zic.c (WORK_AROUND_GLIB_BUG_878): Rename from WORK_AROUND_GNOME_BUG_730332. All uses changed. --- NEWS | 4 ++-- zic.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 34f7810..b90e68c 100644 --- a/NEWS +++ b/NEWS @@ -2106,8 +2106,8 @@ Release 2014d - 2014-05-27 21:34:40 -0700 Changes affecting code zic no longer generates files containing timestamps before the Big Bang. - This works around GNOME bug 730332 - <https://bugzilla.gnome.org/show_bug.cgi?id=730332>. + This works around GNOME glib bug 878 + <https://gitlab.gnome.org/GNOME/glib/issues/878> (Thanks to Leonardo Chiquitto for reporting the bug, and to Arthur David Olson and James Cloos for suggesting improvements to the fix.) diff --git a/zic.c b/zic.c index ce9ccaf..9e25b02 100644 --- a/zic.c +++ b/zic.c @@ -972,17 +972,17 @@ static zic_t const max_time = MAXVAL(zic_t, TIME_T_BITS_IN_FILE); #define BIG_BANG (- (1LL << 59)) #endif -/* If true, work around GNOME bug 730332 - <https://bugzilla.gnome.org/show_bug.cgi?id=730332> +/* If true, work around GNOME glib bug 878 + <https://gitlab.gnome.org/GNOME/glib/issues/878> by refusing to output timestamps before BIG_BANG. Such timestamps are physically suspect anyway. - The GNOME bug is scheduled to be fixed in GNOME 3.22, and if so - this workaround will no longer be needed when GNOME 3.21 and - earlier are obsolete, say in the year 2021. */ -enum { WORK_AROUND_GNOME_BUG_730332 = true }; + The glib bug is scheduled to be fixed in glib 2.58, and if so + this workaround will no longer be needed when glib 2.57 and + earlier are obsolete, say in the year 2025. */ +enum { WORK_AROUND_GLIB_BUG_878 = true }; -static const zic_t early_time = (WORK_AROUND_GNOME_BUG_730332 +static const zic_t early_time = (WORK_AROUND_GLIB_BUG_878 ? BIG_BANG : MINVAL(zic_t, TIME_T_BITS_IN_FILE)); -- 2.17.1
On Mon, 11 Jun 2018, Paul Eggert wrote:
The bug fix was merged into glib master today. Since it’s four years after the fix was proposed (!), push back an estimate of when we can remove the workaround. Also, adjust to GNOME bug renumbering.
It's not just glib possibly affected by overflows with such timestamps; cf. glibc bug 19738, for example (fixed for 32-bit time_t by always using 64-bit times internally for tz file processing, probably not fixed for 64-bit with such extreme times). -- Joseph S. Myers jsm@polyomino.org.uk
Joseph Myers wrote:
It's not just glib possibly affected by overflows with such timestamps; cf. glibc bug 19738, for example (fixed for 32-bit time_t by always using 64-bit times internally for tz file processing, probably not fixed for 64-bit with such extreme times).
Thanks for catching that. The attached proposed patch should fix that. Come to think of it, we should be able to avoid this Big Bang stuff entirely now that type 0 is the default. I plan to follow up shortly with a proposed patch along those lines.
participants (2)
-
Joseph Myers -
Paul Eggert