From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6114 invoked from network); 30 Oct 2008 22:13:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 30 Oct 2008 22:13:38 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 33919 invoked from network); 30 Oct 2008 22:13:32 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Oct 2008 22:13:32 -0000 Received: (qmail 14339 invoked by alias); 30 Oct 2008 22:13:26 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25976 Received: (qmail 14314 invoked from network); 30 Oct 2008 22:13:24 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 30 Oct 2008 22:13:24 -0000 Received: from mtaout02-winn.ispmail.ntl.com (mtaout02-winn.ispmail.ntl.com [81.103.221.48]) by bifrost.dotsrc.org (Postfix) with ESMTP id 8762080524C0 for ; Thu, 30 Oct 2008 23:13:20 +0100 (CET) Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20081030221316.IDCY13155.mtaout02-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com> for ; Thu, 30 Oct 2008 22:13:16 +0000 Received: from pws-pc.ntlworld.com ([81.107.43.40]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20081030221316.FCFY21638.aamtaout02-winn.ispmail.ntl.com@pws-pc.ntlworld.com> for ; Thu, 30 Oct 2008 22:13:16 +0000 Received: from pws-pc (pws-pc [127.0.0.1]) by pws-pc.ntlworld.com (8.14.2/8.14.2) with ESMTP id m9UMD2Mi012011; Thu, 30 Oct 2008 22:13:03 GMT Message-Id: <200810302213.m9UMD2Mi012011@pws-pc.ntlworld.com> From: Peter Stephenson To: "Zsh workers" , pws@pws-pc.ntlworld.com Subject: Re: another bug: zsh_directory_name In-Reply-To: Message from "Mikael Magnusson" of "Thu, 30 Oct 2008 22:26:11 +0100." <237967ef0810301426l1d2b0698xd58eea08a01eb4b0@mail.gmail.com> Date: Thu, 30 Oct 2008 22:13:02 +0000 X-Cloudmark-Analysis: v=1.0 c=1 a=Rv8XxGmo984A:10 a=HYshxDoSAAAA:8 a=NLZqzBF-AAAA:8 a=xMXkv-IocbWVPInsmI8A:9 a=6HbvEc9SfZjN4GlpmgkA:7 a=DX3zzTVxaxIRezVB6anOFb0yzYEA:4 a=VkNj9pNNdSIA:10 a=-hJg1tCh9CgA:10 a=_dQi-Dcv4p4A:10 a=aFdSZ05Rf_QA:10 X-Virus-Scanned: ClamAV 0.92.1/8544/Thu Oct 30 19:59:19 2008 on bifrost X-Virus-Status: Clean "Mikael Magnusson" wrote: > 2008/10/30 Oliver Kiddle : > > 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 Web page now at http://homepage.ntlworld.com/p.w.stephenson/