bug-bash
[Top][All Lists]
Advanced

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

core on "unset PS1" when PS1 display length over 1 line


From: daver
Subject: core on "unset PS1" when PS1 display length over 1 line
Date: Thu, 11 Nov 2004 17:52:58 -0500

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib   -g -O2
uname output: Linux mongo 2.6.7 #21 Sun Oct 17 05:36:27 EDT 2004 i686 GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 3.0
Patch Level: 16
Release Status: release

Description:
        I found myself in a directory with a very long name while having
        \w included in PS1.  I unset PS1 and was surprised by a core.
        This seems related to the displayed length of PS1 being longer
        than 1 line, and is repeatable under xterm, though didn't
        happen running under ddd.  The core backtrace doesn't seem to
        always be in the same place, but one trace follows.

Repeat-By:
        
PS1="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  # 80 x's or more
        unset PS1

Trace:
$ gdb bash core
GNU gdb 6.1-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...Using host libthread_db library 
"/lib/tls/libthread_db.so.1".

Core was generated by `./bash'.
Program terminated with signal 11, Segmentation fault.

warning: current_sos: Can't read pathname for load map: Input/output error

Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/tls/libdl.so.2...done.
Loaded symbols for /lib/tls/libdl.so.2
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  history_do_write (filename=0x8122008 "", nelements=2, overwrite=0)
    at histfile.c:466
466             buffer_size += strlen (the_history[i]->line) + 1;
(gdb) bt
#0  history_do_write (filename=0x8122008 "", nelements=2, overwrite=0)
    at histfile.c:466
#1  0x080c677e in append_history (nelements=135405576, filename=0x8122008 "")
    at histfile.c:531
#2  0x0809090d in maybe_save_shell_history () at bashhist.c:365
#3  0x0808b044 in termination_unwind_protect (sig=11) at sig.c:416
#4  <signal handler called>
#5  0x080bb5b5 in rl_redisplay () at display.c:622
#6  0x080b0d3f in readline_internal_setup () at readline.c:346
#7  0x080b111b in readline_internal () at readline.c:503
#8  0x080b0cba in readline (prompt=0x8120808 "") at readline.c:300
#9  0x0805fe86 in yy_readline_get () at parse.y:1210
#10 0x0805fdfc in yy_getc () at parse.y:1144
#11 0x08060835 in shell_getc (remove_quoted_newline=1) at parse.y:1922
#12 0x080613bc in read_token (command=0) at parse.y:2542
#13 0x08060e16 in yylex () at parse.y:2188
#14 0x0805fc93 in yyparse () at bison.simple:432
#15 0x0805df4d in parse_command () at eval.c:221
#16 0x0805dfbb in read_command () at eval.c:265
#17 0x0805dcb9 in reader_loop () at eval.c:131
#18 0x0805bb66 in main (argc=1, argv=0xbffff6c4, env=0xbffff6cc) at shell.c:704
(gdb)




reply via email to

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