coredump in wcscasecmp
Hi all,
I'm maintaining ncpfs, which uses wide character functions and
localization functions together. I now found, that probably updates
done on 2000-02-12 by Ulrich broke something. If I run this
program, I get segfault in towlower() invoked by wcscasecmp() :-(
#include <wchar.h>
#include <iconv.h>
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
void main(void) {
setlocale(LC_ALL, "");
printf("%d\n",wcscasecmp(L"[Root]2", L"[Root]"));
}
If I remove
setlocale(LC_ALL, "");
it will work again, but it is not option for me. I have no LC_* nor
LANGUAGE in environment. If I set LC_ALL to cs_CZ or en_US, it works,
but neither POSIX nor C nor undefined works.
This problem was observed on Debian Woody system running
glibc-2.1.3-4, which was created from CVS of Feb 17 (last
entry in changelog is correct initialization of class_collection256).
Thanks,
Petr Vandrovec
vandrove@vc.cvut.cz
Reply to: