Pike fails to setlocale, resulting in core dump
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3296
Reported by Martin Nilsson, IDA nilsson@pike.ida.liu.se
I don't think there is anything we can do about this, but a bugreport to reference to might be good.
[nilsson@m222 server]$ pike
Segmentation fault (core dumped)
[nilsson@m222 server]$ pike
Pike v7.3 release 60 running Hilfe v3.5 (Incremental Pike Frontend)
gdb backtrace:
#0 0x400c69a8 in _ufc_foobar () from /lib/libc.so.6
#1 0x400db3b1 in msort_with_tmp (b=0x82944c0, n=2, s=8,
cmp=0x400d6008 <alias_compare>, t=0xbfffb500 "") at msort.c:72
#2 0x400db305 in msort_with_tmp (b=0x82944c0, n=5, s=8,
cmp=0x400d6008 <alias_compare>, t=0xbfffb500 "") at msort.c:47
#3 0x400db305 in msort_with_tmp (b=0x82944c0, n=11, s=8,
cmp=0x400d6008 <alias_compare>, t=0xbfffb500 "") at msort.c:47
#4 0x400db305 in msort_with_tmp (b=0x82944c0, n=23, s=8,
cmp=0x400d6008 <alias_compare>, t=0xbfffb500 "") at msort.c:47
#5 0x400db305 in msort_with_tmp (b=0x82944c0, n=47, s=8,
cmp=0x400d6008 <alias_compare>, t=0xbfffb500 "") at msort.c:47
#6 0x400db463 in qsort (b=0x82944c0, n=47, s=8,
cmp=0x400d6008 <alias_compare>) at msort.c:98
#7 0x400d5c5c in read_alias_file (
fname=0xffffff7c <Address 0xffffff7c out of bounds>, fname_len=-452984831)
at localealias.c:368
#8 0x400d5b1f in _nl_expand_alias (name=0xbffffee7 "en_US")
at localealias.c:205
#9 0x400d11c6 in _nl_find_locale (locale_path=0x8293f88 "/usr/lib/locale",
locale_path_len=16, category=0, name=0xbffff8b4) at findlocale.c:87
#10 0x400d05a8 in setlocale (category=0, locale=0x8197d54 "")
at setlocale.c:384
#11 0x080c9bec in main (argc=1, argv=0xbffffacc)
at /home/nilsson/Pike/7.3/src/main.c:275
#12 0x400c7336 in __libc_start_main (main=0x80c9b20 <main>, argc=1,
ubp_av=0xbffffacc, init=0x805f96c <_init>, fini=0x8177030 <_fini>,
rtld_fini=0x4000d2fc <_dl_fini>, stack_end=0xbffffabc)
at ../sysdeps/generic/libc-start.c:129
where main.c:275 is the following setlocate
#ifdef LC_CTYPE
setlocale(LC_CTYPE, "");
#endif