zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Cc: Eduardo Bustamante <dualbus@gmail.com>
Subject: Re: Zsh parser segmentation fault on taddstr
Date: Sun, 7 May 2017 21:36:31 +0100	[thread overview]
Message-ID: <20170507213631.2a15e7ad@ntlworld.com> (raw)
In-Reply-To: <CAOSMAut8qq+yfOtH3XfU7oGim4CNN=YV0BxZyhU9k80RQ6khgw@mail.gmail.com>

On Sun, 7 May 2017 11:45:57 -0500
Eduardo Bustamante <dualbus@gmail.com> wrote:
> Hi all, the following file crashes Zsh when run with noexec:
> 
> dualbus@mksh-parser-4pxg:~$ cat -A
> cmin-zsh-crashes/output_16_crashes_id:000392,sig:11,src:016511+011323,op:splice,rep:2
> if (a)M-^?^@^@<<^EM-^?^I^F|&^D\
> 
> dualbus@mksh-parser-4pxg:~$ xxd
> cmin-zsh-crashes/output_16_crashes_id:000392,sig:11,src:016511+011323,op:splice,rep:2
> 00000000: 6966 2028 6129 ff00 003c 3c05 ff09 067c  if (a)...<<....|
> 00000010: 2604 5c                                  &.\

I haven't got an actual crash, but I am getting some undefined behaviour
which could do anything so is probably down to the same cause.  I can
get the same behaviour here:


% fn() { cat <<y |& cat
FOO
y
}
% which fn
 text.c:995: unknown word code in gettext2()
fn () {
	time <<y | cat
}


The message is only present with debug enabled.

That's a completely valid function --- I'm guessing it's to do with some
interaction between the here-document and the |&, since | works OK, but
that's as far as I've got.

pws


  reply	other threads:[~2017-05-07 20:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-07 16:45 Eduardo Bustamante
2017-05-07 20:36 ` Peter Stephenson [this message]
2017-05-08  1:59   ` Eduardo Bustamante
2017-05-08  9:37   ` Peter Stephenson
2017-05-08 13:51     ` Eduardo Bustamante

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=20170507213631.2a15e7ad@ntlworld.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=dualbus@gmail.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).