From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15543 invoked from network); 30 Sep 2004 03:55:59 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 30 Sep 2004 03:55:59 -0000 Received: (qmail 61182 invoked from network); 30 Sep 2004 03:55:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Sep 2004 03:55:44 -0000 Received: (qmail 20614 invoked by alias); 30 Sep 2004 03:55:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20417 Received: (qmail 20604 invoked from network); 30 Sep 2004 03:55:30 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 30 Sep 2004 03:55:30 -0000 Received: (qmail 60667 invoked from network); 30 Sep 2004 03:55:15 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 30 Sep 2004 03:55:14 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id i8U3tBg0013272; Wed, 29 Sep 2004 20:55:11 -0700 Date: Wed, 29 Sep 2004 20:55:11 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-workers@sunsite.dk To: Sebastian Rasmussen cc: zsh-workers@sunsite.dk Subject: Re: Command line bug since zsh 3.1.7... In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 On Wed, 29 Sep 2004, Sebastian Rasmussen wrote: > hal9000% zsh -c 'echo bar |' > zsh: segmentation fault zsh -c 'echo bar |' Seems to be this easy (and it should have been obvious that it's wrong to ignore the result of the recursive parse): Index: parse.c =================================================================== RCS file: /extra/cvsroot/zsh/zsh-4.0/Src/parse.c,v retrieving revision 1.20 diff -c -r1.20 parse.c --- parse.c 14 Aug 2004 05:01:23 -0000 1.20 +++ parse.c 30 Sep 2004 03:50:06 -0000 @@ -729,9 +729,9 @@ ecbuf[p] = WCB_PIPE(WC_PIPE_MID, (line >= 0 ? line + 1 : 0)); ecispace(p + 1, 1); ecbuf[p + 1] = ecused - 1 - p; - par_pline(complex); + p = par_pline(complex); cmdpop(); - return 1; + return p; } else if (tok == BARAMP) { int r; @@ -750,9 +750,9 @@ ecbuf[p] = WCB_PIPE(WC_PIPE_MID, (line >= 0 ? line + 1 : 0)); ecispace(p + 1, 1); ecbuf[p + 1] = ecused - 1 - p; - par_pline(complex); + p = par_pline(complex); cmdpop(); - return 1; + return p; } else { ecbuf[p] = WCB_PIPE(WC_PIPE_END, (line >= 0 ? line + 1 : 0)); return 1;