Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh eats 100% CPU with completion in /
- X-seq: zsh-workers 27324
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: zsh eats 100% CPU with completion in /
- Date: Sat, 31 Oct 2009 20:00:31 +0000
- In-reply-to: Message from Mikael Magnusson <mikachu@xxxxxxxxx> of "Fri, 30 Oct 2009 22:33:54 +0100." <237967ef0910301433v6b58a1cdo2b31306ba4adda8a@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Mikael Magnusson wrote:
> 2009/10/30 Mikael Magnusson <mikachu@xxxxxxxxx>:
> > 2009/10/30 Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>:
> >> The subject is not entirely correct.
> >>
> >> Zsh eats 100% CPU on a colleague's laptop if you do this:
> >> % cd /
> >> % cd ..
> >> % ./<tab>
Thanks for the additional details.
So it appears something's going on in this loop in get_comp_string()
around line 1439 of zle_tricky.c:
for (tt = s; tt < s + zlemetacs_qsub - wb;) {
if (*tt == Inbrack) {
i++;
nb = nnb;
ne = tt;
tt++;
} else if (i && *tt == Outbrack) {
i--;
tt++;
} else {
int nclen = MB_METACHARLEN(tt);
if (itype_end(tt, IIDENT, 1) == tt)
nnb = tt + nclen;
tt += nclen;
}
}
It would therefore probably help to know what the various quantities are
in this loop: tt, s, zlemetacs_qsub and wb in particular, and also what
nclen is being returned. (You might need a debugging build to get these
out.) It seems plausible nclen is zero, which obviously causes a
problem. If eveything's in range (and unless we're going backwards the
loop test suggests it should be) this presumably means we encountered a
character we didn't like somewhere, so possibly the LC_CTYPE locale is
useful (I would guess it's UTF-8).
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author