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

Re: another bug: zsh_directory_name



"Mikael Magnusson" wrote:
> 2008/10/30 Oliver Kiddle <okiddle@xxxxxxxxxxx>:
> > Just thought I'd check that the case of calling this new ~[...] stuff
> > recursively had been handled. The following caused an instant seg fault:
> >
> > zsh_directory_name() {
> >  echo ~[]
> > }
> 
> I don't think this has anything to do with ~[],
> % function a() { a }
> % a
> zsh: segmentation fault  zsh

Right.  I get:

pws-pc% function a() { a }
pws-pc% a
a: maximum nested function level reached

and

pws-pc% zsh_directory_name() {
function> echo ~[]
function> }
pws-pc% echo ~[]
zsh_directory_name:1: job table full or recursion limit exceeded

so the problem is that the max function depth is too large on those
systems (or, equivalently, the resource limits are too small).

There's no easy way of handling this more gracefully in the shell, since
we could hit the buffers on any of a zillion zillion allocations with
untested return values.

The default max function depth is currently 1000.  See
zsh-workers/22501 (http://www.zsh.org/mla/workers/2006/msg00388.html).

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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