From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7735 invoked from network); 29 Jul 2004 15:45:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Jul 2004 15:45:34 -0000 Received: (qmail 26654 invoked from network); 29 Jul 2004 15:45:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Jul 2004 15:45:27 -0000 Received: (qmail 21602 invoked by alias); 29 Jul 2004 15:42:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20222 Received: (qmail 21591 invoked from network); 29 Jul 2004 15:42:45 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 29 Jul 2004 15:42:45 -0000 Received: (qmail 19335 invoked from network); 29 Jul 2004 15:41:03 -0000 Received: from lhuumrelay3.lnd.ops.eu.uu.net (62.189.58.19) by a.mx.sunsite.dk with SMTP; 29 Jul 2004 15:41:00 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i6TFeuv04160 for ; Thu, 29 Jul 2004 15:40:57 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Thu, 29 Jul 2004 16:40:09 +0100 Received: from news01.csr.com ([192.168.143.38]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 29 Jul 2004 16:42:49 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.12.11/8.12.11) with ESMTP id i6TFeqgx017660 for ; Thu, 29 Jul 2004 16:40:52 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.12.11/8.12.11/Submit) with ESMTP id i6TFepHQ017657 for ; Thu, 29 Jul 2004 16:40:52 +0100 Message-Id: <200407291540.i6TFepHQ017657@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: Util/helpfiles - problem with provided example In-reply-to: "Peter Stephenson"'s message of "Wed, 28 Jul 2004 11:01:15 BST." <200407281001.i6SA1FvF026186@news01.csr.com> Date: Thu, 29 Jul 2004 16:40:50 +0100 From: Peter Stephenson X-OriginalArrivalTime: 29 Jul 2004 15:42:49.0884 (UTC) FILETIME=[B3F8C5C0:01C47582] X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=6.0 tests=BAYES_00 autolearn=no version=2.63 X-Spam-Hits: -4.9 Peter Stephenson wrote: > Edited down to bare essentials: > > Michael Prokop wrote: > > man () { > > man $1 # this is the original > > } > > $ man zsh > > > Segmentation fault > > This isn't very nice. Should we turn on --enable-max-function-depth by > default? The default for --enable-max-function-depth=yes is 4096 which > isn't going to hurt most people. Or should we make it configurable > internally with a sensible default? Here's a patch which turns it on by default. Index: configure.ac =================================================================== RCS file: /cvsroot/zsh/zsh/configure.ac,v retrieving revision 1.18 diff -u -r1.18 configure.ac --- configure.ac 8 Jun 2004 13:34:12 -0000 1.18 +++ configure.ac 29 Jul 2004 15:39:00 -0000 @@ -301,12 +301,14 @@ AH_TEMPLATE([MAX_FUNCTION_DEPTH], [Define for function depth limits]) AC_ARG_ENABLE(max-function-depth, -[ --enable-max-function-depth=MAX limit function depth to MAX], +[ --enable-max-function-depth=MAX limit function depth to MAX, default 4096], [if test x$enableval = xyes; then AC_DEFINE(MAX_FUNCTION_DEPTH, 4096) -else +elif test x$enableval != xno; then AC_DEFINE_UNQUOTED(MAX_FUNCTION_DEPTH, $enableval) -fi]) +fi], +[AC_DEFINE(MAX_FUNCTION_DEPTH, 4096)] +) dnl Do you want to look for pcre support? AC_ARG_ENABLE(pcre, Index: INSTALL =================================================================== RCS file: /cvsroot/zsh/zsh/INSTALL,v retrieving revision 1.17 diff -u -r1.17 INSTALL --- INSTALL 2 Jul 2004 15:59:11 -0000 1.17 +++ INSTALL 29 Jul 2004 15:39:01 -0000 @@ -330,6 +330,19 @@ `make uninstall' or `make uninstall.fns', although the version-specific directory and its contents will be deleted. +Function depth +-------------- + +Shell functions may be called recursively. In order to detect infinite +recursion the shell has a limit on the depth to which functions may be +called: note that this is a single limit for all functions, not a limit +for each function called recursively. The default for the limit is 4096. +The limit may be altered to the value MAX by passing the option +--enable-max-function-depth=MAX to configure. Alternatively, the limit may +be disabled with --disable-max-function-depth. However, this is not +recommended as it is likely to cause the shell to crash on an infinite +recursion. + Support for large files and integers ------------------------------------ -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************