[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#417815: libc6: localtime dies with : tzfile.c:544: __tzfile_compute: Assertion `num_types == 1' failed

Package: libc6
Version: 2.3.6.ds1-13
Severity: important

I was writing a program using localtime, and i noticed some crashes every so
often (a call every 50ms or so, a crash every 1-2 minutes), which yielded the
following message :

  tzfile.c:544: __tzfile_compute: Assertion `num_types == 1' failed

  which brings us to the code :

             /* This should only happen if there are no transition rules.
                In this case there should be only one single type.  */
             assert (num_types == 1);
            __tzname[0] = __tzstring (zone_names);

  The code yielding to this was of the kind of :

  struct tm tm;
  time_t t;
  t = time(NULL);
  localtime (&t, &tm);

This is in a fr_FR.utf8 locale, on a powerpc box. The same code on an x86 box
just segfaults without error message.


Sven Luther

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-powerpc
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages libc6 depends on:
ii  tzdata                        2007b-1    Time Zone and Daylight Saving Time

libc6 recommends no packages.

-- no debconf information

Reply to: