bug-bash
[Top][All Lists]
Advanced

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

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


From: Shlomi Fish
Subject: [BUG] Bash segfaults on an infinitely recursive funcion (resend)
Date: Sun, 24 Sep 2017 17:01:40 +0300

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 dumped)
shlomif@telaviv1:~$ 

note that this is not a fork bomb as no processes are spawned, and it is also
not an out-of-memory problem. I expect bash to fail on this, but it ought not
to segfault.

also:

shlomif@telaviv1:~$ dash -c 'run() { run; } ; run'
Segmentation fault (core dumped)
shlomif@telaviv1:~$ zsh -c 'run() { run; } ; run'
run: maximum nested function level reached

I hereby put the reproducing code under the
https://creativecommons.org/choose/zero/ .

Credit is due to rosa, ongy, anEpiov and other people of freenode's
##programming channel for inspiring this bug report and helping to diagnose it.

Regards,

        Shlomi



reply via email to

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