From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14699 invoked from network); 17 Jun 2006 17:11:33 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 17 Jun 2006 17:11:33 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 63547 invoked from network); 17 Jun 2006 17:11:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Jun 2006 17:11:26 -0000 Received: (qmail 22999 invoked by alias); 17 Jun 2006 17:11:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22495 Received: (qmail 22990 invoked from network); 17 Jun 2006 17:11:22 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 17 Jun 2006 17:11:22 -0000 Received: (qmail 63096 invoked from network); 17 Jun 2006 17:11:22 -0000 Received: from vms048pub.verizon.net (206.46.252.48) by a.mx.sunsite.dk with SMTP; 17 Jun 2006 17:11:22 -0000 Received: from torch.brasslantern.com ([71.116.105.50]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J1000JFXL2UMGA1@vms048.mailsrvcs.net> for zsh-workers@sunsite.dk; Sat, 17 Jun 2006 12:11:19 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k5HHBH8m032745 for ; Sat, 17 Jun 2006 10:11:18 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k5HHBHsX032744 for zsh-workers@sunsite.dk; Sat, 17 Jun 2006 10:11:17 -0700 Date: Sat, 17 Jun 2006 10:11:17 -0700 From: Bart Schaefer Subject: Re: Segfaulting script In-reply-to: <20060616110319.GB2780@fsst.voodoo.lan> To: zsh-workers@sunsite.dk Message-id: <060617101117.ZM32743@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20060613231505.GA23239@goomba.ruder> <20060616110319.GB2780@fsst.voodoo.lan> Comments: In reply to Frank Terbeck "Re: Segfaulting script" (Jun 16, 1:03pm) On Jun 16, 1:03pm, Frank Terbeck wrote: } } I don't know if this is the same bug, but it might be closely related: } } [snip] } % zsh -f } % testfunc() { local foo=() ; local bar } You can't assign values to an array in a "local" statement. When zsh parses the above, it's seeing local foo= () <-- empty parens means we're defining a function! ; local bar The result is that you define both "local" and "foo=" as the names of functions, each of which has the function body local bar which (of course) is a recursive call to the newly-created function "local". I don't get a segfault with 4.3.2-dev-1, I get an error: zsh% local local:10: maximum nested function level reached zsh% The fact that "compinit" or a completion comes next is a red herring; any function that used "local" would cause the error. My guess would be that you get a segfault when the compile-time setting of the maximum function depth is large enough that you run out of memory before the limit is hit. There's not a whole lot we can do about that.