From: Kamil Dudka <kdudka@redhat.com>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH 2/2] clear the heredoc list in case par_event() fails
Date: Thu, 29 Nov 2018 17:24:56 +0100 [thread overview]
Message-ID: <2172016.U8TV6t29ou@kdudka-nb> (raw)
In-Reply-To: <20150417201753.41812294@ntlworld.com>
[-- Attachment #1: Type: text/plain, Size: 921 bytes --]
On Friday, April 17, 2015 9:17:53 PM CET Peter Stephenson wrote:
> On Fri, 17 Apr 2015 15:25:55 +0200
>
> Kamil Dudka <kdudka@redhat.com> wrote:
> > ... in order to prevent SIGSEGV on the following input when running
> > in the interactive mode:
> >
> > <<X;'
> > ^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
Since the above patch was applied, zsh exits successfully (despite it reports
parse error) on the attached example:
% zsh parse-error.sh; echo $?
parse-error.sh:4: parse error
0
Is this expected?
Kamil
[-- Attachment #2: parse-error.sh --]
[-- Type: application/x-shellscript, Size: 28 bytes --]
next prev parent reply other threads:[~2018-11-29 16:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 13:25 [PATCH 1/2] report bad ELF interpreter if it causes exec to fail Kamil Dudka
2015-04-17 13:25 ` [PATCH 2/2] clear the heredoc list in case par_event() fails Kamil Dudka
2015-04-17 19:17 ` Peter Stephenson
2015-04-20 8:48 ` Kamil Dudka
2018-11-29 16:24 ` Kamil Dudka [this message]
2018-11-29 17:34 ` Peter Stephenson
2018-11-29 18:39 ` Bart Schaefer
2018-11-30 9:55 ` Peter Stephenson
2018-11-30 12:53 ` Kamil Dudka
2015-04-17 13:49 ` [PATCH 1/2] report bad ELF interpreter if it causes exec to fail Daniel Shahaf
2015-04-17 14:32 ` Kamil Dudka
2015-04-17 15:21 ` Oliver Kiddle
2015-04-17 15:59 ` Kamil Dudka
2015-04-17 19:59 ` Oliver Kiddle
2015-04-17 15:41 ` Philippe Troin
2015-04-17 15:51 ` Bart Schaefer
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=2172016.U8TV6t29ou@kdudka-nb \
--to=kdudka@redhat.com \
--cc=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/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).