From: Mikael Magnusson <mikachu@gmail.com>
To: Wayne Davison <wayne@thedavisons.net>
Cc: Bart Schaefer <schaefer@brasslantern.com>,
Peter Stephenson <Peter.Stephenson@csr.com>,
"Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: Next zsh release
Date: Thu, 19 May 2011 20:35:21 +0200 [thread overview]
Message-ID: <BANLkTim0EOQBwp31W6SG8FHWtASiLVtGAw@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikyyCFP0muGMZ5NzkThJrWDPqSsPA@mail.gmail.com>
On 19 May 2011 20:17, Wayne Davison <wayne@thedavisons.net> wrote:
> On Thu, May 19, 2011 at 10:53 AM, Mikael Magnusson <mikachu@gmail.com> wrote:
>> Hm, in this line,
>> push(setmathvar(mvp,c), mvp->lval, 0);
>> isn't it undefined whether setmathvar runs first or mvp->lval is evaluated?
>
> Yeah, it is. That should probably be changed to this, just for safety's sake:
>
> c = setmathvar(mvp, c);
> push(c, mvp->lval, 0);
make check still passes with this change, other than that I'm not sure
exactly what math construct this code actually handles. It fails if I
comment out the push() though, so it's covered I
suppose.</superparanoidmode>
--- a/Src/math.c
+++ b/Src/math.c
@@ -1161,7 +1161,8 @@ op(int what)
}
if (tp & (OP_E2|OP_E2IO)) {
struct mathvalue *mvp = stack + sp + 1;
- push(setmathvar(mvp,c), mvp->lval, 0);
+ c = setmathvar(mvp, c);
+ push(c, mvp->lval, 0);
} else
push(c,NULL, 0);
return;
--
Mikael Magnusson
prev parent reply other threads:[~2011-05-19 18:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 13:02 Peter Stephenson
2011-05-19 14:55 ` Mikael Magnusson
2011-05-19 15:07 ` Peter Stephenson
2011-05-19 20:15 ` Mikael Magnusson
2011-05-19 15:17 ` Bart Schaefer
2011-05-19 16:49 ` Mikael Magnusson
2011-05-19 17:53 ` Mikael Magnusson
2011-05-19 18:17 ` Wayne Davison
2011-05-19 18:35 ` Mikael Magnusson [this message]
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=BANLkTim0EOQBwp31W6SG8FHWtASiLVtGAw@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=Peter.Stephenson@csr.com \
--cc=schaefer@brasslantern.com \
--cc=wayne@thedavisons.net \
--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).