From: Bart Schaefer <schaefer@brasslantern.com>
To: martin.ebourne@arcordia.com, zsh-workers@sunsite.dk
Subject: PATCH: Re: Very odd behaviour with zsh, maybe corruption bug
Date: Sun, 14 Oct 2001 21:56:07 +0000 [thread overview]
Message-ID: <1011014215607.ZM6899@candle.brasslantern.com> (raw)
In-Reply-To: <1011012050227.ZM19535@candle.brasslantern.com>
On Oct 12, 5:02am, Bart Schaefer wrote:
}
} This *must* be a bug in prefork() called via singsub(); it must be zeroing
} `right' (and thus also zeroing `opat') before copying the string. But I
} just can't seem to catch it happening.
Having traced through this more closely, which was rather laborious, I
have come to the conclusion that the bug is right there in evalcond(),
and that the following is the fix. At least, I can't see how this patch
could possibly cause -incorrect- behavior, though it might result in an
optimization being skipped unnecessarily in some cases.
Sven, please dispute this if you can.
Index: Src/cond.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Src/cond.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 cond.c
--- Src/cond.c 2001/04/09 20:14:12 1.1.1.1
+++ Src/cond.c 2001/10/14 21:48:55
@@ -202,7 +202,7 @@
char *opat;
int save;
- right = opat = dupstring(ecrawstr(state->prog, state->pc,
+ right = dupstring(opat = ecrawstr(state->prog, state->pc,
&htok));
if (htok)
singsub(&right);
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
next prev parent reply other threads:[~2001-10-14 21:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-11 10:57 martin.ebourne
2001-10-11 16:30 ` Bart Schaefer
2001-10-12 5:02 ` Bart Schaefer
2001-10-14 21:56 ` Bart Schaefer [this message]
2001-10-15 11:24 ` PATCH: " Sven Wischnowsky
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=1011014215607.ZM6899@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=martin.ebourne@arcordia.com \
--cc=zsh-workers@sunsite.dk \
/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).