From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15441 invoked by alias); 2 Nov 2009 10:07:25 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27334 Received: (qmail 19039 invoked from network); 2 Nov 2009 10:07:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (ns2.melb.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Message-Id: <200911021006.nA2A6sla026530@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@zsh.org Subject: Re: zsh eats 100% CPU with completion in / In-reply-to: <237967ef0911011657n54279c54ja8fce16a1861ff4f@mail.gmail.com> References: <237967ef0911011312u307ecf19kbabf9fecf867cec1@mail.gmail.com> <200911012220.nA1MKgjM005270@pws-pc.ntlworld.com> <237967ef0911011657n54279c54ja8fce16a1861ff4f@mail.gmail.com> Comments: In-reply-to Mikael Magnusson message dated "Mon, 02 Nov 2009 01:57:49 +0100." Date: Mon, 02 Nov 2009 10:06:54 +0000 From: Peter Stephenson X-OriginalArrivalTime: 02 Nov 2009 10:06:56.0490 (UTC) FILETIME=[359064A0:01CA5BA4] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-09-22-03 (www.mailcontrol.com) on 10.68.0.123 Mikael Magnusson wrote: > 2009/11/1 Peter Stephenson : > > 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 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