Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Crash when completion script call itself.
On Fri, 29 Sep 2017 11:40:46 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On Fri, 29 Sep 2017 23:30:56 +1300
> Nicolas Desprès <nicolas.despres@xxxxxxxxx> wrote:
> > On Fri, Sep 29, 2017 at 10:34 PM, Peter Stephenson <p.stephenson@xxxxxxxxxxx
> > > wrote:
> > >
> > > There is already a check in the shell for the function recursion level;
> > > the default value is 1000 (it is configurable at build time). Some
> > > systems will get this far without crashing, as mine does, and I get
> > >
> >
> > I have not built zsh myself. Where can I check this value?
>
> If you don't have the build configuration there's no easy way.
...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
For me that prints 1000 and then the error, but in your case it might
crash first (so start a new zsh before running).
Note that's not actually quite the same as the completion case you were
looking at --- completion has extra hooks so it is likely to be using
more system resources at each recursion level.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author