aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2021-12-17 21:38:00 +0100
committerFlorian Weimer <fweimer@redhat.com>2022-01-07 10:20:58 +0100
commit85b24f9694e21f1d2f2d8b80d3bf690687723347 (patch)
tree9ed7483060062a6c54b7e032d67412f4a8747f1e /scripts
parent515a6f53cd984d5e6e374fbee52772f967fc3c73 (diff)
downloadglibc-85b24f9694e21f1d2f2d8b80d3bf690687723347.tar.xz
glibc-85b24f9694e21f1d2f2d8b80d3bf690687723347.zip
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)
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions