Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

unbounded recursive call in a shell script crashes zsh



The following shell script crashes zsh (tested with zsh-5.3.1-90-g63f086d):

    function foo() {
        if true; then
            foo
        fi
    }

    foo

Is it expected?

I tried to interpret the script with zsh-4.3.11 and it did not crash:

    $ zsh /tmp/test.zsh
    foo:1: job table full or recursion limit exceeded

The script is a minimal example taken out from a powerline sourced script,
for which the crash was originally reported at:

    https://bugzilla.redhat.com/1441092

Kamil



Messages sorted by: Reverse Date, Date, Thread, Author