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

Re: unbounded recursive call in a shell script crashes zsh



On Apr 16,  6:56pm, Daniel Shahaf wrote:
}
} Hmm.  Would it work to measure the stack space used, by declaring
} a local variable in main() [...]?

Aside from it depending on a particular stack architecture which may
not be shared by all hardware, it doesn't solve the problem of knowing
how much stack space will be occupied by the average call frame.

And even if you could manage to divide the available space by the
average size, that's still not a guarantee you won't run out if a
number of frames are larger than average.



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