From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25349 invoked from network); 18 Jan 2009 23:47:50 -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.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Jan 2009 23:47:50 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 36515 invoked from network); 18 Jan 2009 23:47:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Jan 2009 23:47:44 -0000 Received: (qmail 15728 invoked by alias); 18 Jan 2009 23:47:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26359 Received: (qmail 15713 invoked from network); 18 Jan 2009 23:47:37 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 18 Jan 2009 23:47:37 -0000 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227]) by bifrost.dotsrc.org (Postfix) with ESMTP id DFF6480271F0 for ; Mon, 19 Jan 2009 00:47:33 +0100 (CET) Received: by rv-out-0506.google.com with SMTP id g37so2418518rvb.21 for ; Sun, 18 Jan 2009 15:47:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.141.67.21 with SMTP id u21mr2507997rvk.22.1232322451881; Sun, 18 Jan 2009 15:47:31 -0800 (PST) In-Reply-To: <2d460de70901181124l4370b10kcb2c06569607a501@mail.gmail.com> References: <200901081526.48797.arvidjaar@newmail.ru> <200901081230.n08CUXTB010409@news01.csr.com> <200901181447.54147.arvidjaar@newmail.ru> <2d460de70901181124l4370b10kcb2c06569607a501@mail.gmail.com> Date: Sun, 18 Jan 2009 15:47:31 -0800 Message-ID: <691a5d910901181547r4d569891mca406c789af2b35@mail.gmail.com> Subject: Re: 4.3.9: frequent crashes in completion menu selection From: Bart Schaefer To: zsh-workers@sunsite.dk Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/8874/Sun Jan 18 06:02:00 2009 on bifrost X-Virus-Status: Clean On Sun, Jan 18, 2009 at 11:24 AM, Richard Hartmann wrote: > On Sun, Jan 18, 2009 at 12:47, Andrey Borzenkov wrote: > >> Zsh crashes. > > Confirmed for CVS from 13.01.09 It looks like the loop that tries to locate the highlighted match in the list of completions is running one line too far, but I can't see why (a) there is no highlighted match and (b) having a format style causes this to happen. Program received signal SIGSEGV, Segmentation fault. 0x08109622 in domenuselect (dummy=0x8156c74, dat=0xbfe3d4b0) at ../../../zsh-4.0/Src/Zle/complist.c:2433 2433 if (*p && !mmarked(*p) && **p && mselect == (**p)->gnum) (gdb) p p $1 = (Cmatch **) 0x85d7a90 (gdb) p *p $2 = (Cmatch *) 0x148 (gdb) where #0 0x08109622 in domenuselect (dummy=0x8156c74, dat=0xbfe3d4b0) at ../../../zsh-4.0/Src/Zle/complist.c:2433 #1 0x0808f80a in runhookdef (h=0x8156c74, d=0xbfe3d4b0) at ../../zsh-4.0/Src/module.c:990 #2 0x080f0231 in after_complete (dummy=0x815a3dc, dat=0xbfe3d540) at ../../../zsh-4.0/Src/Zle/compcore.c:515 #3 0x0808f86a in runhookdef (h=0x815a3dc, d=0xbfe3d540) at ../../zsh-4.0/Src/module.c:996 #4 0x0812e71e in docomplete (lst=0) at ../../../zsh-4.0/Src/Zle/zle_tricky.c:869 #5 0x0812d507 in expandorcomplete (args=0x8169abc) at ../../../zsh-4.0/Src/Zle/zle_tricky.c:315 Preceding lines are: 2421 mlines = 999999; 2422 mlbeg = 0; 2423 molbeg = -42; 2424 for (;;) { 2425 METACHECK(); 2426 2427 if (mline < 0 || mtab_been_reallocated) { 2428 int x, y; 2429 Cmatch **p = mtab; 2430 2431 for (y = 0; y < mlines; y++) { 2432 for (x = mcols; x > 0; x--, p++) (gdb) p mlines $7 = 999999 (gdb) p y $8 = 1 (gdb) p mtab_been_reallocated $9 = 1 The only assignment of mtab_been_reallocated = 1 is in complistmatches().