zsh-workers
 help / color / mirror / code / Atom feed
From: Roman Neuhauser <neuhauser@sigpipe.cz>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: Regression / err_return / arithmetic 5.4.x ?
Date: Wed, 6 Dec 2017 18:10:58 +0100	[thread overview]
Message-ID: <20171206171058.GA9501@isis.sigpipe.cz> (raw)
In-Reply-To: <170917175028.ZM5119@torch.brasslantern.com>

# schaefer@brasslantern.com / 2017-09-17 17:50:28 -0700:
> On Sep 15,  7:38pm, Bart Schaefer wrote:
> }
> } I reverted 97d4bdb and the problem disappears.  Haven't gotten any
> } further than that, yet.
> 
> Looks like just one case where use of the new bitflags was missed:
> 
> diff --git a/Src/loop.c b/Src/loop.c
> index 40e3bcb..1013aeb 100644
> --- a/Src/loop.c
> +++ b/Src/loop.c
> @@ -428,7 +428,7 @@ execwhile(Estate state, UNUSED(int do_exec))
>      } else
>          for (;;) {
>              state->pc = loop;
> -            noerrexit = 1;
> +            noerrexit = NOERREXIT_EXIT | NOERREXIT_RETURN;
>  
>  	    /* In case the test condition is a functional no-op,
>  	     * make sure signal handlers recognize ^C to end the loop. */

which zsh release has this fix?  and does it cover just arithmetic
expansion or does it fix while conditions in general?  are there any
tests for errreturn?  i'm asking because i see this with 5.4.2:

  $ cat > errreturn.zsh <<\EOF
  > function
  > {
  >   while false; do
  >     :
  >   done
  >   echo you should see this
  > }
  > echo this should come second
  > EOF

  $ zsh -fo noerrreturn errreturn.zsh
  > you should see this
  > this should come second

  $ zsh -fo errreturn errreturn.zsh
  > this should come second

-- 
roman


  reply	other threads:[~2017-12-06 17:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15 21:13 Phil Pennock
2017-09-15 21:55 ` Bart Schaefer
2017-09-16  2:38   ` Bart Schaefer
2017-09-18  0:50     ` Bart Schaefer
2017-12-06 17:10       ` Roman Neuhauser [this message]
2017-12-06 17:35         ` Peter Stephenson
2017-12-06 19:39           ` Bart Schaefer
2017-12-06 23:02             ` Daniel Shahaf

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=20171206171058.GA9501@isis.sigpipe.cz \
    --to=neuhauser@sigpipe.cz \
    --cc=schaefer@brasslantern.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).