bug-bash
[Top][All Lists]
Advanced

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

Re: 4.3 crash entering q! and exiting the shell


From: Eduardo A . Bustamante López
Subject: Re: 4.3 crash entering q! and exiting the shell
Date: Thu, 27 Mar 2014 14:20:29 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Mar 27, 2014 at 07:36:56PM +0100, Matthias Klose wrote:
> seen when entering q!, then leaving the shell with ^D
> 
> $ gdb bash
> (gdb) run
> Starting program: /bin/bash
> doko@gb:~$ q!
> q!: Befehl nicht gefunden.
> doko@gb:~$
> malloc: .././parse.y:2314: assertion botched
> realloc: start and end chunk sizes differ
> last command: q!
> Aborting...
> Program received signal SIGABRT, Aborted.
> 0x00007ffff761df79 in raise () from /lib/x86_64-linux-gnu/libc.so.6
> (gdb) bt
> #0  0x00007ffff761df79 in raise () from /lib/x86_64-linux-gnu/libc.so.6
> #1  0x00007ffff7621388 in abort () from /lib/x86_64-linux-gnu/libc.so.6
> #2  0x000000000044054f in programming_error ()
> #3  0x00000000004b4bc0 in ?? ()
> #4  0x0000000000472bb6 in sh_xrealloc ()
> #5  0x0000000000423879 in ?? ()
> #6  0x0000000000426612 in ?? ()
> #7  0x0000000000429c39 in yyparse ()
> #8  0x0000000000420ebb in parse_command ()
> #9  0x0000000000420f8c in read_command ()
> #10 0x0000000000421189 in reader_loop ()
> #11 0x000000000041f729 in main ()
> (gdb) quit
> 

I noticed that this just happens for a single character, followed by
the '!', when history expansion is enabled:

| dualbus@debian ~ % bash
| bash-4.3$ a!
| bash: a!: command not found
| bash-4.3$ 
| malloc: ./parse.y:2314: assertion botched
| realloc: start and end chunk sizes differ
| last command: a!
| Aborting...zsh: abort      bash
| dualbus@debian ~ % bash
| bash-4.3$ aa!
| bash: aa!: command not found
| bash-4.3$ exit
| dualbus@debian ~ % bash
| bash-4.3$ set +H
| bash-4.3$ a!
| bash: a!: command not found
| bash-4.3$ exit


This is the change that introduced the error:

| % git show 36eb585cfa52fbb6cd0c324c628593ea856a50a5 -- parse.y


And I've attached a patch (well, it's basically just a revert of part of that
change), that "fixes" the issue. I blindly reverted, so I don't know
what error was that specific patch supposed to fix in the first
place. Take my patch just as a pointer of where the issue is.

-- 
Eduardo Alan Bustamante López

Attachment: shell_input.patch
Description: Text Data


reply via email to

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