From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8632 invoked from network); 5 Apr 2007 16:16:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.8 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 5 Apr 2007 16:16:43 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 40816 invoked from network); 5 Apr 2007 16:16:36 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Apr 2007 16:16:36 -0000 Received: (qmail 15022 invoked by alias); 5 Apr 2007 16:16:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23264 Received: (qmail 15013 invoked from network); 5 Apr 2007 16:16:33 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 5 Apr 2007 16:16:33 -0000 Received: (qmail 40534 invoked from network); 5 Apr 2007 16:16:33 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 5 Apr 2007 16:16:29 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 7E0D65C18E; Thu, 5 Apr 2007 12:16:28 -0400 (EDT) Date: Thu, 5 Apr 2007 12:16:28 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Subject: Re: zsh/pcre module causes core dump w/cvs co as of 2007-04-02 Message-ID: <20070405161628.GA23251@scowler.net> Mail-Followup-To: zsh-workers@sunsite.dk References: <070402230029.ZM7255@torch.brasslantern.com> <20070404114533.GA8303@scowler.net> <070404081343.ZM9674@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <070404081343.ZM9674@torch.brasslantern.com> User-Agent: Mutt/1.5.13 (2006-08-11) On Wed, Apr 04, 2007 at 08:13:43AM -0700, Bart Schaefer wrote: > I wouldn't think so, but I'm not sure what that was supposed to achieve. I haven't a clue. Maybe it'd be better to prevent the module from being loadable at all. Index: Src/Modules/pcre.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/pcre.c,v retrieving revision 1.10 diff -u -r1.10 pcre.c --- Src/Modules/pcre.c 30 May 2006 22:35:03 -0000 1.10 +++ Src/Modules/pcre.c 5 Apr 2007 16:12:59 -0000 @@ -189,13 +189,16 @@ return 0; } +static struct conddef cotab[] = { + CONDDEF("pcre-match", CONDF_INFIX, cond_pcre_match, 0, 0, CPCRE_PLAIN) +}; + /**/ #else /* !(HAVE_PCRE_COMPILE && HAVE_PCRE_EXEC) */ # define bin_pcre_compile bin_notavail # define bin_pcre_study bin_notavail # define bin_pcre_match bin_notavail -# define cond_pcre_match cond_match /**/ #endif /* !(HAVE_PCRE_COMPILE && HAVE_PCRE_EXEC) */ @@ -206,10 +209,6 @@ BUILTIN("pcre_match", 0, bin_pcre_match, 1, 2, 0, "a", NULL) }; -static struct conddef cotab[] = { - CONDDEF("pcre-match", CONDF_INFIX, cond_pcre_match, 0, 0, CPCRE_PLAIN) -}; - /**/ int @@ -222,8 +221,12 @@ int boot_(Module m) { +#if defined(HAVE_PCRE_COMPILE) && defined(HAVE_PCRE_EXEC) return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab)) || !addconddefs(m->nam, cotab, sizeof(cotab)/sizeof(*cotab)); +#else /* !(HAVE_PCRE_COMPILE && HAVE_PCRE_EXEC) */ + return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab)); +#endif /* !(HAVE_PCRE_COMPILE && HAVE_PCRE_EXEC) */ } /**/ @@ -231,7 +234,9 @@ cleanup_(Module m) { deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab)); +#if defined(HAVE_PCRE_COMPILE) && defined(HAVE_PCRE_EXEC) deleteconddefs(m->nam, cotab, sizeof(cotab)/sizeof(*cotab)); +#endif /* !(HAVE_PCRE_COMPILE && HAVE_PCRE_EXEC) */ return 0; }