From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Segfault on "task <Tab><Tab>" with zsh 5.0.2 [PATCH]
Date: Thu, 19 Sep 2013 07:42:04 -0700 [thread overview]
Message-ID: <130919074204.ZM16009@torch.brasslantern.com> (raw)
In-Reply-To: <20130919094955.56c23268@pwslap01u.europe.root.pri>
On Sep 19, 9:49am, Peter Stephenson wrote:
}
} The way i is decremented and p incremented at different points makes it
} very difficult to see what's going on --- I suspect there's an argument
} for moving the decrement just for clarity but this fix will do fine.
I believe get_cadef is going to have the same bug, it uses the identical
technique for managing its cache.
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 2c323ee..f8983c3 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1608,7 +1608,7 @@ get_cadef(char *nam, char **args)
return *p;
} else if (!min || !*p || (*p)->lastt < (*min)->lastt)
min = p;
- if (i)
+ if (i > 0)
min = p;
if ((new = parse_cadef(nam, args))) {
freecadef(*min);
--
Barton E. Schaefer
prev parent reply other threads:[~2013-09-19 14:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 22:18 Segfault on "task <Tab><Tab>" with zsh 5.0.2 Axel Beckert
2013-09-13 8:37 ` Peter Stephenson
2013-09-13 11:34 ` Axel Beckert
2013-09-13 11:51 ` Peter Stephenson
2013-09-13 12:24 ` Axel Beckert
2013-09-13 12:36 ` Peter Stephenson
2013-09-13 19:33 ` Pierre Schmitz
2013-09-16 16:17 ` Ivan S. Freitas
2013-09-16 17:18 ` Axel Beckert
2013-09-17 8:56 ` Peter Stephenson
2013-09-17 16:10 ` Segfault on "task <Tab><Tab>" with zsh 5.0.2 (minimal dataset to reproduce the issue found) Axel Beckert
2013-09-17 16:35 ` Axel Beckert
2013-09-17 19:05 ` Peter Stephenson
2013-09-17 20:12 ` Axel Beckert
2013-09-18 3:05 ` Bart Schaefer
2013-09-18 21:50 ` Segfault on "task <Tab><Tab>" with zsh 5.0.2 [PATCH] Axel Beckert
2013-09-19 8:49 ` Peter Stephenson
2013-09-19 14:42 ` Bart Schaefer [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=130919074204.ZM16009@torch.brasslantern.com \
--to=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).