From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12106 invoked from network); 19 Jun 2006 10:20:09 -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.4 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; 19 Jun 2006 10:20:09 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 33347 invoked from network); 19 Jun 2006 10:20:00 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Jun 2006 10:20:00 -0000 Received: (qmail 20809 invoked by alias); 19 Jun 2006 10:19:58 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22501 Received: (qmail 20800 invoked from network); 19 Jun 2006 10:19:57 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 19 Jun 2006 10:19:57 -0000 Received: (qmail 33034 invoked from network); 19 Jun 2006 10:19:57 -0000 Received: from cluster-c.mailcontrol.com (168.143.177.190) by a.mx.sunsite.dk with SMTP; 19 Jun 2006 10:19:55 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly21c.srv.mailcontrol.com (MailControl) with ESMTP id k5JAFPMt017153 for ; Mon, 19 Jun 2006 11:19:41 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 19 Jun 2006 11:18:36 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.4/8.13.4) with ESMTP id k5JAJ7Yc017267 for ; Mon, 19 Jun 2006 11:19:07 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.4/8.13.4/Submit) with ESMTP id k5JAJ7sF017264 for ; Mon, 19 Jun 2006 11:19:07 +0100 Message-Id: <200606191019.k5JAJ7sF017264@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: Recursion error and line numbers In-reply-to: <060618070625.ZM846@torch.brasslantern.com> References: <200606181238.k5ICcCXY007519@pwslaptop.csr.com> <060618070625.ZM846@torch.brasslantern.com> Comments: In-reply-to Bart Schaefer message dated "Sun, 18 Jun 2006 07:06:25 -0700." Date: Mon, 19 Jun 2006 11:19:07 +0100 From: Peter Stephenson X-OriginalArrivalTime: 19 Jun 2006 10:18:36.0259 (UTC) FILETIME=[B9BCAB30:01C69389] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-07-00-10 (www.mailcontrol.com) on 10.67.0.131 Bart Schaefer wrote: > } How about 1000? That seems to stop it. > > It looks as if it's been 4096 ever since we added it back in about > April 2000. A default of 1000 is most likely OK, given that it's > configure-time settable. Yes, I think making the average PC work is a good thing to aim for in the default settings. Here's the patch. > } > Obviously the recursion depth isn't 1 or 10 or 50 either. Where is that > } > number coming from? I would have expected "1" in all cases. > } > } It's a subtle effect of line number handling and I haven't quite worked > } out why yet. > > Perhaps it has something to do with having left off the braces around > the function body? That seems to be it. Hmm... some difference in behaviour is not *so* stupid. A function written in that form is a bit like an inlined macro, and you might usually be more interested in the line number in the context rather than the function. Still, the combination of function name and line number which isn't in the function is clearly wrong. Index: README =================================================================== RCS file: /cvsroot/zsh/zsh/README,v retrieving revision 1.32 diff -u -r1.32 README --- README 20 Mar 2006 11:06:23 -0000 1.32 +++ README 19 Jun 2006 10:17:31 -0000 @@ -63,6 +63,12 @@ hit for anyone not using PINE. The previous default can be restored with: zstyle ':completion:*' pine-directory ~/mail +The default maximum function depth (configurable with +--enable-max-function-depth) has been decreased to 1000 from 4096. The +previous value was observed to be large enough that crashes still occurred +on some fairly common PC configurations. This change is only likely to +affect some highly specialised uses of the shell. + Documentation ------------- Index: configure.ac =================================================================== RCS file: /cvsroot/zsh/zsh/configure.ac,v retrieving revision 1.54 diff -u -r1.54 configure.ac --- configure.ac 5 Jun 2006 16:55:38 -0000 1.54 +++ configure.ac 19 Jun 2006 10:17:33 -0000 @@ -325,13 +325,13 @@ AH_TEMPLATE([MAX_FUNCTION_DEPTH], [Define for function depth limits]) AC_ARG_ENABLE(max-function-depth, -AC_HELP_STRING([--enable-max-function-depth=MAX], [limit function depth to MAX, default 4096]), +AC_HELP_STRING([--enable-max-function-depth=MAX], [limit function depth to MAX, default 1000]), [if test x$enableval = xyes; then - AC_DEFINE(MAX_FUNCTION_DEPTH, 4096) + AC_DEFINE(MAX_FUNCTION_DEPTH, 1000) elif test x$enableval != xno; then AC_DEFINE_UNQUOTED(MAX_FUNCTION_DEPTH, $enableval) fi], -[AC_DEFINE(MAX_FUNCTION_DEPTH, 4096)] +[AC_DEFINE(MAX_FUNCTION_DEPTH, 1000)] ) dnl Do you want to look for pcre support? -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php