From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11728 invoked by alias); 20 Apr 2015 08:48:25 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34937 Received: (qmail 141 invoked from network); 20 Apr 2015 08:48:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 From: Kamil Dudka To: Peter Stephenson Cc: zsh-workers@zsh.org Subject: Re: [PATCH 2/2] clear the heredoc list in case par_event() fails Date: Mon, 20 Apr 2015 10:48:14 +0200 Message-ID: <178698551.3eabVDmnWu@kdudka.brq.redhat.com> User-Agent: KMail/4.14.6 (Linux/3.19.1-201.fc21.x86_64; KDE/4.14.6; x86_64; ; ) In-Reply-To: <20150417201753.41812294@ntlworld.com> References: <1429277155-24607-1-git-send-email-kdudka@redhat.com> <1429277155-24607-2-git-send-email-kdudka@redhat.com> <20150417201753.41812294@ntlworld.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 On Friday 17 April 2015 20:17:53 Peter Stephenson wrote: > On Fri, 17 Apr 2015 15:25:55 +0200 > > Kamil Dudka wrote: > > ... in order to prevent SIGSEGV on the following input when running > > in the interactive mode: > > > > < > ^C > > > > ^C > > I think that still leaves cruft around of other kinds. I think the fix > is something like the following. > > diff --git a/Src/parse.c b/Src/parse.c > index 91a81e1..985eb8e 100644 > --- a/Src/parse.c > +++ b/Src/parse.c > @@ -605,6 +605,7 @@ par_event(int endtok) > if (!par_event(endtok)) { > ecused = oec; > ecbuf[p] |= wc_bdata(Z_END); > + return errflag ? 0 : 1; > } > } > return 1; > > pws Thanks for the patch! This works for me. Kamil