This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
[rganesan@myrealbox.com] libc/1632: towupper() segfaults after call to set locale
- To: libc-alpha Mailinglist <libc-alpha at sourceware dot cygnus dot com>
- Subject: [rganesan@myrealbox.com] libc/1632: towupper() segfaults after call to set locale
- From: Andreas Jaeger <aj at suse dot de>
- Date: 07 Mar 2000 16:41:12 +0100
- Cc: rganesan at myrealbox dot com
Hi glibc folks,
We've received the appended bug report. I can reproduce the problem
after clearing my environment from LANG and LC_ALL.
Here's an output from gdb:
Program received signal SIGSEGV, Segmentation fault.
0x400c3ff5 in towupper (wc=65) at wcfuncs.c:97
97 return (wint_t) __ctype32_toupper[idx];
(gdb) p __ctype32_toupper
$1 = (__int32_t *) 0x0
Btw. towlower works fine.
Andreas
- Subject: libc/1632: towupper() segfaults after call to set locale
- From: rganesan at myrealbox dot com
- Date: Tue Mar 7 16:15:12 2000
Topics:
libc/1632: towupper() segfaults after call to set locale
----------------------------------------------------------------------
Date: Mon, 6 Mar 2000 08:17:26 -0500
From: rganesan@myrealbox.com
To: bugs@gnu.org
Subject: libc/1632: towupper() segfaults after call to set locale
Message-Id: <200003061317.IAA07197@delysid.gnu.org>
>Number: 1632
>Category: libc
>Synopsis: towupper() segfaults after call to set locale
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: libc-gnats
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Mon Mar 06 08:20:02 EST 2000
>Last-Modified:
>Originator: rganesan@myrealbox.com
>Organization:
net
>Release: libc-2.1.3
>Environment:
Debian GNU/Linux 2.2 (potato)
Redhat Linux 2.1 (with glibc upgraded to 2.1.3)
>Description:
A call towupper() causes a setfault after calling setlocale if LC_ALL is not
set. glib 2.1.2 does not have this problem (Tested with glibc 2.1.2-11 on
Redhat Linux 2.1). Please see the attached code to repeat the problem.
If you set LC_ALL the program runs fine.
>How-To-Repeat:
#include <wchar.h>
#include <locale.h>
int
main()
{
wint_t wc = 'A';
setlocale(LC_ALL, "");
towupper(wc);
}%0
>Fix:
>Audit-Trail:
>Unformatted:
------------------------------
End of forward1nC09v Digest
***************************
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de