[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash segfaults on startup when TERM=eterm* and EMACS is unset

From: Roman Rakus
Subject: Re: bash segfaults on startup when TERM=eterm* and EMACS is unset
Date: Wed, 09 Dec 2009 16:33:58 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4

On 10/29/2009 10:35 AM, Roman Rakus wrote:
$subject can be triggered easily by setting TERM to eterm (with unset EMACS). Originally this segfault was caused by running emacs and within emacs try to ssh on localhost.

Reproducer 1)
address@hidden ~]$ bash
address@hidden ~]$ exit
address@hidden ~]$ env TERM=eterm bash
Segmentation fault
address@hidden ~]$ env TERM=eterm-sldkhflsad bash
Segmentation fault

Reproducer 2)
1. Start emacs on some machine.
2. M-x ansi-term
3. 'echo $TERM' to verify that it's eterm-color or eterm
4. 'ssh F11HOST' (where F11HOST is a machine with bash 4.0 installed
and set as your shell)
5. Observe the connection being closed instead of receiving a prompt.

Following patch hinders segfault:

--- bash-4.0/shell.c.orig    2009-10-15 15:57:56.000000000 -0400
+++ bash-4.0/shell.c    2009-10-15 15:58:28.000000000 -0400
@@ -572,7 +572,7 @@

       /* running_under_emacs == 2 for `eterm' */
running_under_emacs = (emacs != 0) || (term&& STREQN (term, "emacs", 5)); - running_under_emacs += term&& STREQN (term, "eterm", 5)&& strstr (emacs, "term"); + running_under_emacs += term&& STREQN (term, "eterm", 5)&& (emacs != 0)&& strstr (emacs, "term");

       if (running_under_emacs)
     gnu_error_format = 1;


Any updates/comments here?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]