From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3232 invoked from network); 9 Feb 2008 17:23:29 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Feb 2008 17:23:29 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 19825 invoked from network); 9 Feb 2008 17:23:21 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Feb 2008 17:23:21 -0000 Received: (qmail 10105 invoked by alias); 9 Feb 2008 17:23:17 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24542 Received: (qmail 10087 invoked from network); 9 Feb 2008 17:23:17 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 9 Feb 2008 17:23:17 -0000 Received: from mtaout01-winn.ispmail.ntl.com (mtaout01-winn.ispmail.ntl.com [81.103.221.47]) by bifrost.dotsrc.org (Postfix) with ESMTP id B34AF80482A1 for ; Sat, 9 Feb 2008 18:23:13 +0100 (CET) Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20080209172453.SZNK18243.mtaout01-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Sat, 9 Feb 2008 17:24:53 +0000 Received: from pws-pc.ntlworld.com ([81.107.42.63]) by aamtaout03-winn.ispmail.ntl.com with ESMTP id <20080209172656.WOPJ26699.aamtaout03-winn.ispmail.ntl.com@pws-pc.ntlworld.com> for ; Sat, 9 Feb 2008 17:26:56 +0000 Received: from pws-pc (pws-pc [127.0.0.1]) by pws-pc.ntlworld.com (8.14.2/8.14.2) with ESMTP id m19HLoca004761 for ; Sat, 9 Feb 2008 17:21:50 GMT Message-Id: <200802091721.m19HLoca004761@pws-pc.ntlworld.com> From: Peter Stephenson To: zsh-workers Subject: Re: Completion lockup In-Reply-To: Message from "Mikael Magnusson" of "Wed, 06 Feb 2008 16:02:49 +0100." <237967ef0802060702s35df5863g91844ab9dde5cfd6@mail.gmail.com> Date: Sat, 09 Feb 2008 17:21:50 +0000 X-Cloudmark-Analysis: v=1.0 c=1 a=Rw7lO6RaNG4A:15 a=3FTp5y5X6ml6ZCsPBftHHg==:17 a=NLZqzBF-AAAA:8 a=zohLCVUE5T-G2i0LkroA:9 a=eBS2Ict5Bq8AG7QDWcYA:7 a=XrMvmvhA4dTVXfuymkfKaa_RyjYA:4 a=_dQi-Dcv4p4A:10 a=aFdSZ05Rf_QA:10 X-Virus-Scanned: ClamAV 0.91.2/5759/Sat Feb 9 16:52:29 2008 on bifrost X-Virus-Status: Clean "Mikael Magnusson" wrote: > zsh -f > setopt rcquotes > a''' > Tried on two machines with 4.3.4-dev-7, both started spinning 100% cpu > longer than i felt like waiting. get_comp_string() is the second most horrible function ever written. The following not only stopped the crash it apparently worked, i.e. it complete a file a\'foobar I created in the path! I didn't like to look any further. I'm sure you'll let me know if anything funny is going on. Index: Src/Zle/zle_tricky.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v retrieving revision 1.89 diff -u -r1.89 zle_tricky.c --- Src/Zle/zle_tricky.c 3 Oct 2007 16:18:38 -0000 1.89 +++ Src/Zle/zle_tricky.c 9 Feb 2008 17:18:16 -0000 @@ -1230,11 +1230,16 @@ /* This is done when the lexer reached the word the cursor is on. */ tt = tokstr ? dupstring(tokstr) : NULL; - if (isset(RCQUOTES) && *tt == Snull) { - char *p, *e = tt + zlemetacs - wb; - for (p = tt; *p && p < e; p++) - if (*p == '\'') - qsub++; + if (isset(RCQUOTES)) { + char *tt1, *e = tt + zlemetacs - wb; + for (tt1 = tt; *tt1; tt1++) { + if (*tt1 == Snull) { + char *p; + for (p = tt1; *p && p < e; p++) + if (*p == '\'') + qsub++; + } + } } /* If we added a `x', remove it. */ if (addedx && tt) -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/