bash 5.0 dies with HISTSIZE=0

2019-02-20 Thread Michael Albinus
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security
uname output: Linux BRONB4NHFYN1 4.20.8-200.fc29.x86_64 #1 SMP Wed Feb 13 
13:08:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 5.0
Patch Level: 0
Release Status: release

Description:
This is an error report from an Emacs/Tramp user. With bash 5.0, bash
5.0 dies when HISTSIZE is set to 0. Setting it to 1 seems to work. Using
bash 4.4 works as well. https://debbugs.gnu.org/34192> for details.

Repeat-By:
The following is an extract from what Tramp does inside Emacs. I could
reproduce it in a a shell:

# env TERM='dumb' INSIDE_EMACS='27.0.50,tramp:2.4.2-pre' ENV='' HISTFILE='' 
HISTFILESIZE=0 HISTSIZE=0 PROMPT_COMMAND='' PS1=\#\$\  PS2='' PS3='' 
/home/albinus/src/bash-5.0/bash -norc -noprofile
#$ tramp_perl_file_name_all_completions () {
\perl -e '
opendir(d, $ARGV[0]) || die("$ARGV[0]: $!\nfail\n");

The first line starts bash 5.0 with several environment variables,
including HISTSIZE=0. The second line, after the "#$ " prompt, starts a
shell function declaration. The third and fourth line belong to this
shell function. After the fourth line, bash dies. The exit code is 139.

The same scenario, but with HISTSIZE=1, works proper.

Best regards, Michael.


Re: bash 5.0 dies with HISTSIZE=0

2019-02-21 Thread Michael Albinus
Chet Ramey  writes:

Hi Chet,

>> Description:
>> This is an error report from an Emacs/Tramp user. With bash 5.0, bash
>> 5.0 dies when HISTSIZE is set to 0. Setting it to 1 seems to work. Using
>> bash 4.4 works as well. https://debbugs.gnu.org/34192> for details.
>
> Thanks for the report. Try the attached patch and see if that fixes the
> crash.

Thanks a lot, your patch fixes the problem.

> Chet

Best regards, Michael.

PS: Could you pls give me a bug number or something like this, that I
can reference to?



Re: bash 5.0 dies with HISTSIZE=0

2019-02-21 Thread Michael Albinus
Greg Wooledge  writes:

> Bash doesn't use a formal bug tracking system.  Chet manages it all
> by hand.  Your best bet is to find the list archive copy of this thread,
> and bookmark it.  (Start at .)

I see, thanks!

Best regards, Michael.



Re: bash 5.0 dies with HISTSIZE=0

2019-02-21 Thread Michael Albinus
Chet Ramey  writes:

>> PS: Could you pls give me a bug number or something like this, that I
>> can reference to?
>
> You can use the link to the mailing list. There is a more formal bug
> tracking system on savannah.gnu.org, but few people use it.

I know. That's why several GNU projects use debbugs.gnu.org, which runs
Debian's BTS software.

> Chet

Best regrds, Michael.



Re: bash 5.0 dies with HISTSIZE=0

2019-02-22 Thread Michael Albinus
Chet Ramey  writes:

>> I know. That's why several GNU projects use debbugs.gnu.org, which runs
>> Debian's BTS software.
>
> Few people use that one, either. Most of the active bugs there are at least
> a year old.

???

There are very active projects, with new bugs every single day. I, for
example, am subscribed to the Emacs bugs. There are much more open bug
reports I'd like to see ...

Best regards, Michael.