c2879fd933
* Thu Jan 13 2022 Florian Weimer <fweimer@redhat.com> - 2.34-18 - Backport optimized ELF dependency sorting algorithm (#2032647) * Thu Jan 13 2022 Florian Weimer <fweimer@redhat.com> - 2.34-17 - Sync with upstream branch release/2.34/master, commit 2fe2af88abd13ae5636881da2e26f461ecb7dfb5 - i386: Remove broken CAN_USE_REGISTER_ASM_EBP (bug 28771) - Update syscall lists for Linux 5.15 - powerpc: Fix unrecognized instruction errors with recent GCC - timezone: test-case for BZ #28707 - timezone: handle truncated timezones from tzcode-2021d and later (BZ #28707) - Fix subscript error with odd TZif file [BZ #28338] - AArch64: Check for SVE in ifuncs [BZ #28744] - intl/plural.y: Avoid conflicting declarations of yyerror and yylex - Linux: Fix 32-bit vDSO for clock_gettime on powerpc32 - linux: Add sparck brk implementation - Update sparc libm-test-ulps - Update hppa libm-test-ulps - riscv: align stack before calling _dl_init [BZ #28703] - riscv: align stack in clone [BZ #28702] - powerpc64[le]: Allocate extra stack frame on syscall.S - elf: Fix tst-cpu-features-cpuinfo for KVM guests on some AMD systems [BZ #28704] - nss: Use "files dns" as the default for the hosts database (bug 28700) - arm: Guard ucontext _rtld_global_ro access by SHARED, not PIC macro - mips: increase stack alignment in clone to match the ABI - mips: align stack in clone [BZ #28223] Resolves: #2032647 Resolves: #2033649
53 lines
2.4 KiB
Diff
53 lines
2.4 KiB
Diff
commit 85b24f9694e21f1d2f2d8b80d3bf690687723347
|
|
Author: Hans-Peter Nilsson <hp@axis.com>
|
|
Date: Fri Dec 17 21:38:00 2021 +0100
|
|
|
|
timezone: handle truncated timezones from tzcode-2021d and later (BZ #28707)
|
|
|
|
When using a timezone file with a truncated starting time,
|
|
generated by the zic in IANA tzcode-2021d a.k.a. tzlib-2021d
|
|
(also in tzlib-2021e; current as of this writing), glibc
|
|
asserts in __tzfile_read (on e.g. tzset() for this file) and
|
|
you may find lines matching "tzfile.c:435: __tzfile_read:
|
|
Assertion `num_types == 1' failed" in your syslog.
|
|
|
|
One example of such a file is the tzfile for Asuncion
|
|
generated by tzlib-2021e as follows, using the tzlib-2021e zic:
|
|
"zic -d DEST -r @1546300800 -L /dev/null -b slim
|
|
SOURCE/southamerica". Note that in its type 2 header, it has
|
|
two entries in its "time-types" array (types), but only one
|
|
entry in its "transition types" array (type_idxs).
|
|
|
|
This is valid and expected already in the published RFC8536, and
|
|
not even frowned upon: "Local time for timestamps before the
|
|
first transition is specified by the first time type (time type
|
|
0)" ... "every nonzero local time type index SHOULD appear at
|
|
least once in the transition type array". Note the "nonzero ...
|
|
index". Until the 2021d zic, index 0 has been shared by the
|
|
first valid transition but with 2021d it's separate, set apart
|
|
as a placeholder and only "implicitly" indexed. (A draft update
|
|
of the RFC mandates that the entry at index 0 is a placeholder
|
|
in this case, hence can no longer be shared.)
|
|
|
|
* time/tzfile.c (__tzfile_read): Don't assert when no transitions
|
|
are found.
|
|
|
|
Co-authored-by: Christopher Wong <Christopher.Wong@axis.com>
|
|
(cherry picked from commit c36f64aa6dff13b12a1e03a185e75a50fa9f6a4c)
|
|
|
|
diff --git a/time/tzfile.c b/time/tzfile.c
|
|
index 190a777152b31cee..8668392ad387af05 100644
|
|
--- a/time/tzfile.c
|
|
+++ b/time/tzfile.c
|
|
@@ -431,8 +431,8 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
|
|
if (__tzname[0] == NULL)
|
|
{
|
|
/* This should only happen if there are no transition rules.
|
|
- In this case there should be only one single type. */
|
|
- assert (num_types == 1);
|
|
+ In this case there's usually only one single type, unless
|
|
+ e.g. the data file has a truncated time-range. */
|
|
__tzname[0] = __tzstring (zone_names);
|
|
}
|
|
if (__tzname[1] == NULL)
|