Bug 12066 - towupper() segfaults under C locale
towupper() segfaults under C locale
Product: Red Hat Linux
Classification: Retired
Component: libc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2000-06-10 17:33 EDT by Dimitri Papadopoulos
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-08-08 22:41:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch C-ctype.c, Fix Initializer Order (2.03 KB, patch)
2002-05-02 00:28 EDT, Kurt Kaiser
no flags Details | Diff

  None (edit)
Description Dimitri Papadopoulos 2000-06-10 17:33:52 EDT
Run this program under a C locale (not en_US):

#include <wctype.h>
#include <locale.h>
int main() {
    setlocale( LC_ALL, "" );
    towupper( 0 );
    return 0;
Comment 1 Cristian Gafton 2000-08-08 22:41:39 EDT
assigned to jakub
Comment 2 Jakub Jelinek 2000-08-24 06:22:07 EDT
glibc-2.1.92 fixes this (basically, wide character support in glibc 2.1 was fairly incomplete)
Comment 3 Kurt Kaiser 2002-05-02 00:19:26 EDT
This was a "typo" in locale/C-type.c which was fixed at rev in the 
glibc-2-1 branch.  It missed being in glibc-2.1.3 series rpms by about two
weeks.  The segfault is still present in glibc-2.1.3-23.src.rpm, 17 months
after it was fixed.

It is possible that the segfault can be avoided by setting a LANG environment
variable. I patched my glibc and don't want to revert to check that out.
Comment 4 Kurt Kaiser 2002-05-02 00:28:56 EDT
Created attachment 56124 [details]
Patch C-ctype.c, Fix Initializer Order
Comment 5 Kurt Kaiser 2002-05-02 00:56:34 EDT
ah, the bug in C-ctype.c was fixed at on 15 Mar 2000

Note You need to log in before you can comment on or make changes to this bug.