Bug 116934 - (bash segfault) changing XTERM env variable gnome | gnome-rh90
(bash segfault) changing XTERM env variable gnome | gnome-rh90
Product: Fedora
Classification: Fedora
Component: libtermcap (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Depends On:
Blocks: FC2Blocker
  Show dependency treegraph
Reported: 2004-02-26 11:48 EST by James Laska
Modified: 2013-09-02 01:54 EDT (History)
7 users (show)

See Also:
Fixed In Version: 2.0.8-38
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-05 10:59:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Xterm strace output (strace -o ... xterm) (97.10 KB, text/plain)
2004-02-26 11:49 EST, James Laska
no flags Details
termcap-116934.patch (421 bytes, patch)
2004-04-21 09:07 EDT, Tim Waugh
no flags Details | Diff

  None (edit)
Description James Laska 2004-02-26 11:48:12 EST
The following sequence kills gnome-terminal and xterm (havne't tried

$ export TERM=gnome
$ export TERM=gnome-rh90
$ export TERM=gnome
$ export TERM=gnome-rh90
$ export TERM=gnome
$ export TERM=gnome-rh90


lemme know what additional information you would like to debug this.
I'm attaching strace output while doing this in xterm.
Comment 1 James Laska 2004-02-26 11:49:02 EST
Created attachment 98076 [details]
Xterm strace output (strace -o ... xterm)
Comment 2 Eido Inoue 2004-04-14 12:13:39 EDT
Nalin... I think this is a gnome-terminal/vte bug
Comment 3 Warren Togami 2004-04-18 01:40:34 EDT
It is not the terminal, but the bash shell itself.  It even happens in
a text VT.  zsh seems unaffected by this problem.

Program received signal SIGSEGV, Segmentation fault.
0x00a9564d in _int_free (av=0xb4d760, mem=0x874e288) at malloc.c:4223
4223            unlink(p, bck, fwd);
(gdb) bt
#0  0x00a9564d in _int_free (av=0xb4d760, mem=0x874e288) at malloc.c:4223
#1  0x00a96b5b in __libc_free (mem=0x874e288) at malloc.c:3374
#2  0x00d76a26 in tgetent () from /lib/libtermcap.so.2
#3  0x080b407f in _rl_init_terminal_io (terminal_name=0x875c708
"gnome") at terminal.c:392
#4  0x080b4341 in rl_reset_terminal (terminal_name=0x36722d6d <Address
0x36722d6d out of bounds>) at terminal.c:525
#5  0x0806fccc in stupidly_hack_special_variables (name=0x874e998
"TERM") at variables.c:3472
#6  0x0807979b in do_assignment_internal (string=0x8741a70
"\220\032t\b\b�u\b", expand=0) at subst.c:1992
#7  0x08079987 in do_assignment_no_expand (string=0x36722d6d <Address
0x36722d6d out of bounds>) at subst.c:2017
#8  0x0809acfe in set_or_show_attributes (list=0x8746d08, attribute=1,
nodefs=4) at setattr.def:217
#9  0x0809aad0 in export_builtin (list=0x36722d6d) at setattr.def:73
#10 0x0806a8ca in execute_builtin (builtin=0x809aab0 <export_builtin>,
words=0x36722d6d, flags=0, subshell=0)
    at execute_cmd.c:2829
#11 0x0806b019 in execute_builtin_or_function (words=0x8749688,
builtin=0x809aab0 <export_builtin>, var=0x36722d6d,
    redirects=0x36722d6d, fds_to_close=0x36722d6d, flags=0) at
#12 0x0806a401 in execute_simple_command (simple_command=0x87575b0,
pipe_in=-1, pipe_out=-1, async=0,
    fds_to_close=0x8750c38) at execute_cmd.c:2704
#13 0x0806781a in execute_command_internal (command=0x874f608,
asynchronous=0, pipe_in=-1, pipe_out=-1,
    fds_to_close=0x8750c38) at execute_cmd.c:633
#14 0x08067345 in execute_command (command=0x36722d6d) at
#15 0x0805c9b0 in reader_loop () at eval.c:143
#16 0x0805ac95 in main (argc=1, argv=0xfeedb554, env=0xfeedb55c) at
Comment 4 Tim Waugh 2004-04-21 09:07:52 EDT
Created attachment 99597 [details]

Try this patch.
Comment 5 Colin Charles 2004-05-07 08:19:50 EDT
I have just tried this with gnome-terminal/xterm with todays Rawhide
tree (upgraded from a fc2test3 install), and this is not reproducable. 


This might be closable as RAWHIDE.
Comment 6 Warren Togami 2004-05-07 08:43:13 EDT
I have the exact same versions as in comment #5, and I can still
reproduce this crash.  Will need to test patch a little later.
Comment 7 Michael Schwendt 2004-05-07 09:50:41 EDT
Patch works for me.

Can reproduce the crash on FC1 with libtermcap-2.0.8-37.1 (rebuilt
from rawhide), but can't reproduce it with the patch from comment 4
being applied.
Comment 8 Michael Schwendt 2004-05-07 10:11:26 EDT
Confirmation for yesterday's Rawhide. Needs eight (8) times toggling
$TERM between gnome and gnome-rh9 to crash. Patch fixes it.
Comment 9 Colin Charles 2004-05-07 10:23:31 EDT
OK, with the standard .bashrc in /etc/skel, this cannot be reproduced,
as in comment #5. However, using a custom .bashrc crashes
gnome-terminal (or the tab that it was running in). The patch in
comment #4 works to fix this.

On FC1, the crash does happen with a custom .bashrc, but with a fresh
user I still cannot reproduce the crash.
Comment 10 Tim Waugh 2004-05-07 11:56:45 EDT
Fixed package has been built as 2.0.8-38.
Comment 11 James Laska 2004-08-05 10:59:39 EDT
fixed in rawhide-latest (as of 08/05/2004) using libtermcap-2.0.8-39.
 Please re-open this issue if the bug re-appears.

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