Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: another bug: zsh_directory_name
- X-seq: zsh-workers 25976
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: "Zsh workers" <zsh-workers@xxxxxxxxxx>, pws@xxxxxxxxxxxxxxxxxxx
- Subject: Re: another bug: zsh_directory_name
- Date: Thu, 30 Oct 2008 22:13:02 +0000
- In-reply-to: Message from "Mikael Magnusson" <mikachu@xxxxxxxxx> of "Thu, 30 Oct 2008 22:26:11 +0100." <237967ef0810301426l1d2b0698xd58eea08a01eb4b0@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
"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