Re: [BUG] Bash segfaults on an infinitely recursive funcion (resend)

2017-10-05 Thread Dan Douglas
On 10/05/2017 02:29 PM, Dan Douglas wrote: > ... Another band-aid might be to build bash with -fsplit-stack. Hardly worth mentioning as it doesn't fix anything - you just run out of memory instead of overflowing a fixed-size stack, should someone actually want that for some reason.

Re: [BUG] Bash segfaults on an infinitely recursive funcion (resend)

2017-10-05 Thread Dan Douglas
On 09/25/2017 01:38 PM, Eric Blake wrote: > On 09/24/2017 12:53 PM, Shlomi Fish wrote: > >> >> I see. Well, the general wisdom is that a program should not ever segfault, >> but >> instead gracefully handle the error and exit. > > This is possible by installing a SIGSEGV handler that is able to

Re: [BUG] Bash segfaults on an infinitely recursive funcion (resend)

2017-10-04 Thread Shlomi Fish
Hi all, On Mon, 25 Sep 2017 13:38:01 -0500 Eric Blake wrote: > On 09/24/2017 12:53 PM, Shlomi Fish wrote: > > > > > I see. Well, the general wisdom is that a program should not ever segfault, > > but instead gracefully handle the error and exit. > > This is possible by

Re: [BUG] Bash segfaults on an infinitely recursive funcion (resend)

2017-09-25 Thread Eric Blake
On 09/24/2017 12:53 PM, Shlomi Fish wrote: > > I see. Well, the general wisdom is that a program should not ever segfault, > but > instead gracefully handle the error and exit. This is possible by installing a SIGSEGV handler that is able to gracefully exit the program when stack overflow is

Re: [BUG] Bash segfaults on an infinitely recursive funcion (resend)

2017-09-25 Thread Greg Wooledge
On Sun, Sep 24, 2017 at 08:53:46PM +0300, Shlomi Fish wrote: > I see. Well, the general wisdom is that a program should not ever segfault, > but > instead gracefully handle the error and exit. This only applies to applications, not to tools that let YOU write applications. I can write a trivial

Re: [BUG] Bash segfaults on an infinitely recursive funcion (resend)

2017-09-24 Thread Chet Ramey
On 9/24/17 1:53 PM, Shlomi Fish wrote: > I see. Well, the general wisdom is that a program should not ever segfault, > but > instead gracefully handle the error and exit. Perhaps implement a maximal > recursion depth like zsh does. Perhaps read the documentation about the FUNCNEST variable.

Re: [BUG] Bash segfaults on an infinitely recursive funcion (resend)

2017-09-24 Thread Shlomi Fish
Hi all, On Sun, 24 Sep 2017 19:24:10 +0300 Pierre Gaston wrote: > On Sun, Sep 24, 2017 at 5:01 PM, Shlomi Fish wrote: > > > Hi all, > > > > With bash git master on Mageia v7 x86-64, bash on Debian Stable and other > > reported sytems: > > > >

Re: [BUG] Bash segfaults on an infinitely recursive funcion (resend)

2017-09-24 Thread Pierre Gaston
On Sun, Sep 24, 2017 at 5:01 PM, Shlomi Fish wrote: > Hi all, > > With bash git master on Mageia v7 x86-64, bash on Debian Stable and other > reported sytems: > > shlomif@telaviv1:~$ /home/shlomif/apps/bash/bin/bash -c 'run() { run; } ; > run' > Segmentation fault (core