Bug#843819: gnome-terminal: Parenthesis in the directory name leads to crash

Jason Crain jason at inspiresomeone.us
Sat Feb 4 20:07:17 UTC 2017


Control: tags -1 - moreinfo unreproducible
Control: reassign -1 bash 4.4-4

On Sat, Feb 04, 2017 at 07:49:22PM +0200, Prometheus wrote:
> Ok I managed to reproduce this:
> 
> Create a new folder in nautilus 
> 
> /mnt/new/Temp/data/syncccccc/unklllllll/llllllll/ΠΠ-07-Ααααααα βββ
> γγγγγδδδδδ δδδδδδδδδδδδ/εεεεεεεε/θθθθ-άάά 2-θθθθθό ώωωωω
> ύυυυυυαααααααααββββ/Plot-LLC (3350)
> 
> now go one folder behind the last and open terminal
> 
> cd Plot-LLC\ \(3350\)/
> 
> The terminal closes immediately.

This looks like a problem in bash. gnome-terminal closes because the
bash process ends. I can reproduce it with the following commands:

mkdir -p "/tmp/data/unklllllllll/llllllllllllllllll/ΠΠ-07-Ααααααα βββ γγγγγδδδδδ δδδδδδδδδδδδ/εεεεεεεε/θθθθ-άάά 2-θθθθθό ώωωωω ύυυυυυαααααααααββββ/Plot-LLC (3350)/"
cd "/tmp/data/unklllllllll/llllllllllllllllll/ΠΠ-07-Ααααααα βββ γγγγγδδδδδ δδδδδδδδδδδδ/εεεεεεεε/θθθθ-άάά 2-θθθθθό ώωωωω ύυυυυυαααααααααββββ/Plot-LLC (3350)/"

To crash, it requires the terminal width to be narrow, under 80 columns
or so, and a fancy prompt. I'm using the colored prompt from the default
.bashrc:

PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "

Backtrace is attached.
-------------- next part --------------
Program received signal SIGSEGV, Segmentation fault.
0x00000000004b8e73 in rl_redisplay () at ../../.././lib/readline/display.c:823
823	../../.././lib/readline/display.c: No such file or directory.
(gdb) bt
#0  0x00000000004b8e73 in rl_redisplay ()
    at ../../.././lib/readline/display.c:823
#1  0x00000000004a5f6c in readline_internal_setup ()
    at ../../.././lib/readline/readline.c:443
#2  0x00000000004a7152 in readline_internal ()
    at ../../.././lib/readline/readline.c:669
#3  readline (prompt=<optimized out>) at ../../.././lib/readline/readline.c:376
#4  0x0000000000423555 in yy_readline_get ()
    at /usr/homes/chet/src/bash/src/parse.y:1456
#5  0x0000000000425b0e in yy_getc ()
    at /usr/homes/chet/src/bash/src/parse.y:1390
#6  shell_getc (remove_quoted_newline=1)
    at /usr/homes/chet/src/bash/src/parse.y:2299
#7  0x0000000000428dca in read_token (command=0)
    at /usr/homes/chet/src/bash/src/parse.y:3115
#8  0x000000000042c781 in yylex () at /usr/homes/chet/src/bash/src/parse.y:2675
#9  yyparse () at y.tab.c:1834
#10 0x0000000000422dcf in parse_command () at .././eval.c:261
#11 0x0000000000422ed8 in read_command () at .././eval.c:305
#12 0x00000000004230bb in reader_loop () at .././eval.c:149
#13 0x0000000000421d4e in main (argc=1, argv=0x7fffffffdfe8, 
    env=0x7fffffffdff8) at .././shell.c:792



More information about the pkg-gnome-maintainers mailing list