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


From: Shlomi Fish
Subject: [BUG] Bash segfaults on an infinitely recursive funcion
Date: Sun, 24 Sep 2017 16:25:29 +0300

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:~$ 

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:

address@hidden:~$ dash -c 'run() { run; } ; run'
Segmentation fault (core dumped)
address@hidden:~$ 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
 m
-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Free (Creative Commons) Music Downloads, Reviews and more - http://jamendo.com/

For every A, Chuck Norris is both A and not-A.
Chuck Norris is freaking everything.
    — http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/




reply via email to

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