bug-bash
[Top][All Lists]
Advanced

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

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


From: Pierre Gaston
Subject: Re: [BUG] Bash segfaults on an infinitely recursive funcion (resend)
Date: Sun, 24 Sep 2017 19:24:10 +0300

On Sun, Sep 24, 2017 at 5:01 PM, Shlomi Fish <address@hidden> wrote:

> Hi all,
>
> With bash git master on Mageia v7 x86-64, bash on Debian Stable and other
> reported sytems:
>
> address@hidden:~$ /home/shlomif/apps/bash/bin/bash -c 'run() { run; } ;
> run'
> Segmentation fault (core dumped)
> address@hidden:~$
>

This, or some, variant has been reported multiple times.
Like in most programming languages, you can easily write programs that
behave badly,
in this case you are exhausting the stack has there is no tail call
optimization.

see for instance
https://lists.gnu.org/archive/html/bug-bash/2012-09/msg00073.html
and the following discussion
https://lists.gnu.org/archive/html/bug-bash/2012-10/threads.html#00005


reply via email to

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