bug-bash
[Top][All Lists]
Advanced

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

Bug in gen_shell_function_matches()


From: Vladimir Barbarosh
Subject: Bug in gen_shell_function_matches()
Date: Sat, 31 Oct 2009 14:34:52 +0200

Hi!

I found bug in 'GNU bash, version 4.0.0(18)-release (i686-pc-linux-gnu)'.  In
order to reply it, just type:

        $ ./configure
        $ make
        $ ./bash
        $ ls a<TAB>
        malloc: /Users/chet/src/bash/src/parse.y:5561: assertion botched
        free: called with unallocated block argument
        last command: ./bash
        Aborting...Aborted

In order to fix it:

        1. Open file 'pcomplete.c'.
        2. Go to line 1008.
        3. Change it to 'sh_parser_state_t ps = {0};'

But, this reveals another problem.  Just try to type, under bash sources
directory, 'ls a<TAB>'.  First time you press <TAB> your speaker will beep.
Second time you press <TAB> files will be listed, but cursor go to the left
part of 'xterm'.  You always must press END key on the keyboard in order to
place cursor where it shold be.

The problem as it turned out was in $PS1 variable.  It's hard to say exactly
what is the cause, probably some escape sequence.  I just comment it out in
'.bashrc' file and problem disappear.

        PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"

But one problem remain.  <CTRL-L> doesn't work as expected.  In order to
clear screen you need to type 'clear' rather then just <CTRL-L>.  For now I
just don't know how to correct that.

P.S. Sorry for my bad English.

-- 
Vladimir Barbarosh




reply via email to

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