[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



This one time, at band camp, Sven Luther said:
> And indeed, like i said, it worked fine 100s of times, and then died. Try :
> 
> int main (void) {
>   struct tm tm;
>   time_t t;
>   while (1) {
>     t = time(NULL);
>     localtime_r (&t, &tm);
>   }
>   exit(0);
> }

steve@gashuffer:~$ cat t.c
#include <time.h>
#include <stdlib.h>

int main (void) {
  struct tm tm;
  time_t t;
  while (1) {
    t = time(NULL);
    localtime_r (&t, &tm);
  }
  exit(0);
}

steve@gashuffer:~$ gcc -Wall t.c
steve@gashuffer:~$ time LC_ALL=fr_FR.utf8  ./a.out
real    1m21.381s
user    1m1.716s
sys     0m18.985s

No crash.  This is x86, but ppc is the same.
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran@debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature


Reply to: