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

Re: Crash when completion script call itself.



On Fri, 29 Sep 2017 08:22:16 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Philosophically speaking, the value of 1000 for max depth was also
> based on user experience, and one might expect that most environments
> now have more stack space available than they did many years ago when
> 1000 was chosen.  So reducing this value might make it more likely
> that people will encounter the "depth exceeded" error.

I think what's actually happened is we're saving and restoring rather
more stuff.

> At the least
> the error message should be updated to mention increasing FUNCNEST ?

I can certainly do that.

> With respect to the #ifdefs, I think entirely removing FUNCNEST is a
> bad idea -- it should remain so that its value can be examined.  We
> could go so far as to mark it readonly if preventing it from being
> reset is the intention.  I guess that affects whether the shell keeps
> track of the current depth, too, but that doesn't seem like much
> overhead.

That was the intention but it escaped in one place --- the only
remaining place should be where FUNCNEST gets initialised to -1 if the
configuration parameter was undefined.

pws



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