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

Re: Crash when completion script call itself.



On Friday, September 29, 2017 1:10:08 PM CEST Peter Stephenson wrote:
> On Sat, 30 Sep 2017 00:03:53 +1300
> 
> Nicolas Desprès <nicolas.despres@xxxxxxxxx> wrote:
> > On Fri, Sep 29, 2017 at 11:45 PM, Peter Stephenson
> > <p.stephenson@xxxxxxxxxxx> 
> > > wrote:
> > > 
> > > ...come to think of it, slightly more helpfully, you can at least see
> > > how far it gets on your system...
> > > 
> > > i=0; fn() { print $(( ++i )); fn; }; fn
> > 
> > 767 and then crash. Maybe setting it to 500 would be enough? I think I
> > remember that Python limit is 500 too.
> 
> I've no personal objection to reducing it to 500 by default (and I'll
> probably add a variable anyway), but I'd like to know if anyone has
> strong feelings --- given this is a bit of a kludge anyway and this is
> based on a sample of one.
> 
> pws

Recompiling zsh with the -fconserve-stack option of GCC made the default 
nesting limit 1000 reachable again on Fedora:

https://src.fedoraproject.org/rpms/zsh/c/2524ac47

But decreasing the limit to 500 sounds reasonable...

Kamil



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