helpThe GNU Bourne-Again SHell - Support: sr #107179, '\ \^Q^I' produces SIGABORT /...


sr #107179: '\ \^Q^I' produces SIGABORT / "programming error"

Submitted by:  None
Submitted on:  Wed 23 Dec 2009 06:57:24 PM UTC  
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 23 Dec 2009 08:34:09 PM UTC, comment #2:

also needed '--with-installed-readline' configure argument .

Incidentally, this bug also occurs with the gentoo package :
bash-4.0_p35.ebuild as well as building from the git repository:
git:// .
Only building after reconfiguration with
'--with-installed-readline' and '--without-bash-malloc' fixes.

Wed 23 Dec 2009 08:28:22 PM UTC, comment #1:

Aha ! bash now needs configuration with '--without-bash-malloc' -
this fixed the problem after rebuild, anyway.

Wed 23 Dec 2009 06:57:24 PM UTC, original submission:

For emacs users such as myself, a common typo is to use
the emacs "literal next" keystroke (^Q) in the shell,
with default stty(1) settings this is a terminal "start",
to resume from a suspend / "stop" (^S) .
I believe a terminal "start" without any preceding "stop"
should be ignored by the shell, as it is by ksh and
previous bash versions (eg. bash-3.2.39 ).

However, now with :
GNU bash, version 4.0.35(3)-release (x86_64-unknown-linux-gnu)

inadvertently using the "^Q" keystroke when preceded by an escape "\\" character causes bash heap corruption and to crash,
as shown by this "gdb" session :

$ gdb ./bash
This GDB was configured as "x86_64-gnu-linux".
(gdb) start -i -
Temporary breakpoint 1 at 0x41c720: file ../shell.c, line 349.
Starting program: /usr/src/bash-4.0/x86_64/bash -i -

Temporary breakpoint 1, main (argc=3, argv=0x7fffffffecb8, env=0x7fffffffecd8) at ../shell.c:349
349 {
(gdb) c
[ root@jvdspc:/usr/src/bash-4.0/x86_64 18:29:35 501:1 ]
$ echo '\ \
# ^-- here I had keyed '^Q<TAB>'
# (when I should have keyed '^V<TAB>' ! )
# but this should not happen! :
malloc: unknown:0: assertion botched
free: start and end chunk sizes differ
last command: . ~/clean.env
Program received signal SIGABRT, Aborted.
0x00007ffff78b419e in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:67
67 int res = INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) where
#0 0x00007ffff78b419e in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:67
#1 0x00007ffff78b5610 in *__GI_abort () at abort.c:92
#2 0x0000000000439244 in programming_error (format=0x7097e8 ". ~/clean.env") at ../error.c:175
#3 0x00000000004a18a1 in internal_free (mem=0x6e15e8, file=0x0, line=0, flags=<value optimized out>) at ../../../lib/malloc/malloc.c:902
#4 0x0000000000486f91 in rl_filename_completion_function (text=<value optimized out>, state=21877) at ../../../lib/readline/complete.c:2137
#5 0x00000000004875f3 in rl_completion_matches (text=0x6e15c8 "\\ \\", entry_function=<value optimized out>) at ../../../lib/readline/complete.c:1887
#6 0x0000000000488978 in rl_complete_internal (what_to_do=9) at ../../../lib/readline/complete.c:1746
#7 0x0000000000480c4b in _rl_dispatch_subseq (key=9, map=0x6d42a0, got_subseq=0) at ../../../lib/readline/readline.c:769
#8 0x00000000004813b7 in readline_internal_char () at ../../../lib/readline/readline.c:548
#9 0x00000000004817ad in readline_internal_charloop (prompt=<value optimized out>) at ../../../lib/readline/readline.c:575
#10 readline_internal (prompt=<value optimized out>) at ../../../lib/readline/readline.c:589
#11 readline (prompt=<value optimized out>) at ../../../lib/readline/readline.c:338
#12 0x00000000004208a7 in yy_readline_get () at ../parse.y:1314
#13 0x000000000041fcde in yy_getc (remove_quoted_newline=1) at ../parse.y:1247
#14 shell_getc (remove_quoted_newline=1) at ../parse.y:2096
#15 0x0000000000422dca in read_token (command=<value optimized out>) at ../parse.y:2730
#16 0x0000000000425c1e in yylex () at ../parse.y:2362
#17 yyparse () at
#18 0x000000000041dbaa in parse_command () at ../eval.c:228
#19 0x000000000041dc76 in read_command () at ../eval.c:272
#20 0x000000000041deb4 in reader_loop () at ../eval.c:137
#21 0x000000000041d5d3 in main (argc=<value optimized out>, argv=<value optimized out>, env=<value optimized out>) at ../shell.c:741



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by chet (Updated the item)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Thu 12 Nov 2015 08:31:00 PM UTC chet StatusNone => Done
        Summary\'\\ \\^Q^I\' produces SIGABORT / "programming error" => '\ \^Q^I' produces SIGABORT / "programming error"
    Thu 12 Nov 2015 01:58:15 PM UTC chet Summary\'\\ \\^Q^I\' produces SIGABORT / "programming error" => '\ \^Q^I' produces SIGABORT / "programming error"

    Back to the top

    Powered by Savane 3.3