Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh eats 100% CPU with completion in /



Mikael Magnusson wrote:
> 2009/11/1 Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>:
> > Mikael Magnusson wrote:
> >> I did the break after typing ./ and before pressing tab.
> >
> > Nothing leapt out of that.  "tokstr" seems to be coming back as "." and
> > then the "." gets removed, as far as I can see, but looking at it out of
> > context I might be wrong.
> >
> > Might be worth checking zlemetacs as well as zlemetaline and zlemetall
> > on entry to get_comp_string() in case they're already wrong, otherwise
> > it's probably down in the bowels of gettok() where it puts together the
> > string it's returning.  I suspect a counting error---one of the myriad
> > substractions to correct for all the things that need fixing on the way
> > through the position calculations is wrong.
> 
> Before I actually have to start thinking and looking at the code, does
> this tell you anything? In the working trace, I didn't do the cd ..
> (this is from break zshlex)
> I tried breaking on gettok but it appears my modules don't have debug
> symbols, I might get back in a while if anything interesting shows up there.

I think the diff there is simply telling us it's already broken by that
point because the first loop is ending early, i.e the tt string which
has come from tokstr (copied just before the first difference) is zero
bytes long.  This definitely points at the lexical analyser (but the
interaction between that and zle is murky so there could still be some
information from zle that's wrong).

-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom



Messages sorted by: Reverse Date, Date, Thread, Author