From: Bart Schaefer <schaefer@brasslantern.com>
To: Sebastian Rasmussen <sebras@hotmail.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: Command line bug since zsh 3.1.7...
Date: Wed, 29 Sep 2004 20:55:11 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.61.0409292052590.3955@toltec.zanshin.com> (raw)
In-Reply-To: <BAY2-F2825q8awYFDIf0000af93@hotmail.com>
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;
next prev parent reply other threads:[~2004-09-30 3:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-29 15:06 Sebastian Rasmussen
2004-09-30 3:55 ` Bart Schaefer [this message]
2004-09-30 4:16 ` Bart Schaefer
2004-09-30 11:19 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.61.0409292052590.3955@toltec.zanshin.com \
--to=schaefer@brasslantern.com \
--cc=sebras@hotmail.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).