Bug 21882 - Segfaults with glibc 2.2-5
Summary: Segfaults with glibc 2.2-5
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: XFree86
Version: 7.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: Aaron Brown
: 21878 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2000-12-07 09:25 UTC by Ville Herva
Modified: 2007-04-18 16:30 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2001-03-01 21:48:54 UTC

Attachments (Terms of Use)

Description Ville Herva 2000-12-07 09:25:48 UTC
(resubmitting since I didn't see the bug go into the database.)

After upgrading from glibc-2.1.97 to glib-2.2-5, a few programs have begun
to segfault.

For example, rxvt-2.6.3-2 now segfaults each time I select text from it and
paste it to _another_ window. Unfortunately, I'm no longer able to get a
gdb backtrace of it, since X seems to kill it first:

rxvt: XError: Request: 18 . 0, Error: 16

At one point I was able to get a gdb bt, but I didn't save it. It was quite
similar to this Opera bt, though:

0x4021ef91 in chunk_alloc (ar_ptr=0x402c1c60, nb=16) at malloc.c:2771
2771    malloc.c: No such file or directory.
(gdb) bt
#0  0x4021ef91 in chunk_alloc (ar_ptr=0x402c1c60, nb=16) at malloc.c:2771
#1  0x4021ed8e in __libc_malloc (bytes=12) at malloc.c:2704
#2  0x400a4a0d in __builtin_new (sz=12) from /usr/lib/libstdc++-libc6.1-1.so.2
#3  0x824fd03 in strcpy () at ../sysdeps/generic/strcpy.c:31
#4  0x8250875 in strcpy () at ../sysdeps/generic/strcpy.c:31
#5  0x8292ad1 in strcpy () at ../sysdeps/generic/strcpy.c:31
#6  0x830288e in strcpy () at ../sysdeps/generic/strcpy.c:31
#7  0x8142c44 in strcpy () at ../sysdeps/generic/strcpy.c:31
#8  0x86a8930 in ?? ()

(Opera has also begun segfaulting on start after upgrading glibc.)

The same rxvt binary worked fine with glibc-2.1.97.

I compiled rxvt-2.6.3 from source, and it exhibits the same problem. The
devel version 2.7.3 does not crash, but it corrupts the selection. Other X
programs have not problems whatsoever wrt selection.

Comment 1 Daniel Roesen 2000-12-07 12:04:35 UTC
*** Bug 21878 has been marked as a duplicate of this bug. ***

Comment 2 Jakub Jelinek 2000-12-08 11:47:03 UTC
I cannot reproduce this, I have stock
rpm -q rxvt glibc
rpm -q --qf '%{ARCH}\n' rxvt glibc
and am able to paste any text from rxvt into either another rxvt or netscape
without a problem.
I've even tried i386 glibc-2.2-5 and could not reproduce it either.
Can you perhaps run both programs under ElectricFence (because that backtrace
smells like stompoing on memory somewhere)?

Comment 3 Ville Herva 2000-12-12 20:36:09 UTC
I did some further research. The problem appear with these LC settings (the
default for Finnish installation, but I think some other languages might fail as


If I set LC_ALL=en_US (for example), the problem disappears. Some other
LC-configurations (LC_CTYPE=fi_FI.ISO8859-1;LC_COLLATE=fi_FI.ISO8859-1 or
LC_ALL=fi_FI.ISO8859-1) work as well. 

I'm not sure whether this is a glibc, XFree library, or rxvt bug, but glibc is
the one I upgraded, and then it started to happen.

I saw another guy on IRC report the same problem with glibc-2.2-5 as well.

BTW: For some reason, I do not get mail when you alter this bugzilla case.
(Hence the slow response.)

Comment 4 Jakub Jelinek 2000-12-12 20:48:59 UTC
Thanks, that changes things, will see if I can reproduce it tomorrow.

Comment 5 Jakub Jelinek 2000-12-13 17:00:30 UTC
This is IMHO X bug. The change between glibc 2.1.94 and 2.2 was that
setlocale no longer canonicalizes the locale name, but SuS2 in no way
requires something more than that you can pass that value back to setlocale
to restore that locale.
What you can do:
1) use fi_FI.ISO8859-1 locales (not finnish nor fi_FI.ISO-8859-1)
2) add the locales into /usr/X11R6/lib/X11/locale/locale.alias:
finnish: fi_FI.ISO8859-1
fi_FI.ISO-8859-1: fi_FI.ISO8859-1
3) the best would be if X11 used the same locale parsing algorithm as glibc,
of course

Comment 6 Mike A. Harris 2001-03-01 21:48:49 UTC
Recommended changes to locale

Comment 7 Mike A. Harris 2001-03-15 17:37:15 UTC
Should be fixed in Rawhide release 4.0.2a-1 and later

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