From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21257 invoked from network); 18 Jan 2008 16:30:15 -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.4 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; 18 Jan 2008 16:30:15 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 79710 invoked from network); 18 Jan 2008 16:30:10 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Jan 2008 16:30:10 -0000 Received: (qmail 16340 invoked by alias); 18 Jan 2008 16:30:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24406 Received: (qmail 16307 invoked from network); 18 Jan 2008 16:30:04 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 18 Jan 2008 16:30:04 -0000 Received: from virusfilter.dotsrc.org (bifrost [127.0.0.1]) by spamfilter.dotsrc.org (Postfix) with ESMTP id D73B781009F3 for ; Fri, 18 Jan 2008 17:29:55 +0100 (CET) Received: from cluster-g.mailcontrol.com (cluster-g.mailcontrol.com [85.115.41.190]) by bifrost.dotsrc.org (Postfix) with ESMTP for ; Fri, 18 Jan 2008 17:29:55 +0100 (CET) Received: from rly10g.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly10g.srv.mailcontrol.com (MailControl) with ESMTP id m0IGTWHF024371 for ; Fri, 18 Jan 2008 16:29:50 GMT Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly10g.srv.mailcontrol.com (MailControl) id m0IGSipm019781 for zsh-workers@sunsite.dk; Fri, 18 Jan 2008 16:28:44 GMT Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly10g-eth0.srv.mailcontrol.com (envelope-sender Peter.Stephenson@csr.com) (MIMEDefang) with ESMTP id m0IGQxGV015125; Fri, 18 Jan 2008 16:28:44 +0000 (GMT) Received: from news01 ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Fri, 18 Jan 2008 16:27:18 +0000 Date: Fri, 18 Jan 2008 16:27:18 +0000 From: Peter Stephenson To: "Jun T." , zsh-workers@sunsite.dk Subject: Re: core dump while completing: infinite recursion? Message-ID: <20080118162718.3bdcdb29@news01> In-Reply-To: References: Organization: CSR X-Mailer: Claws Mail 3.2.0 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Jan 2008 16:27:18.0986 (UTC) FILETIME=[FEAC6AA0:01C859EE] X-Scanned-By: MailControl A-08-00-01 (www.mailcontrol.com) on 10.71.1.120 X-Virus-Scanned: ClamAV using ClamSMTP On Thu, 27 Dec 2007 21:37:01 +0900 "Jun T." wrote: > This bug is first repotred in the "Apple Discussion" > http://discussions.apple.com/thread.jspa?threadID=1303878&tstart=0 > > [1] Problem: > zsh (sometimes) core dumps if "case-insensitive" and "partial-completion" > matchings are used simulatneously. Thanks for the detailed instructions; I got this to happen easily when I finally looked. It seems to fix it if we do a "deep" copy of the structures involved at one point in the code. The code here is particularly obscure, but I think this was original done as a matter of efficiency, so this should be OK. Index: Src/Zle/compmatch.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/compmatch.c,v retrieving revision 1.52 diff -u -r1.52 compmatch.c --- Src/Zle/compmatch.c 28 Nov 2007 21:14:14 -0000 1.52 +++ Src/Zle/compmatch.c 18 Jan 2008 16:23:33 -0000 @@ -2003,8 +2003,8 @@ ca = a->prefix; while (n) { - e->prefix = cp_cline(n, 0); - a->prefix = cp_cline(ca, 0); + e->prefix = cp_cline(n, 1); + a->prefix = cp_cline(ca, 1); if (anew) { int f = e->flags; -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070