From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16135 invoked by alias); 13 Aug 2010 21:49:33 -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: 28167 Received: (qmail 10870 invoked from network); 13 Aug 2010 21:49:29 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at ntlworld.com designates 81.103.221.56 as permitted sender) Date: Fri, 13 Aug 2010 21:43:57 +0100 From: Peter Stephenson To: zsh-workers mailing list Subject: Re: segfault on menu-select Message-ID: <20100813214357.012f7f35@pws-pc> In-Reply-To: <100813085709.ZM22377@torch.brasslantern.com> References: <20100812144626.GI28144@ph> <8762zf6fwo.fsf@ft.bewatermyfriend.org> <20100812152044.GJ28144@ph> <87wrrv4yrg.fsf@ft.bewatermyfriend.org> <20100812165307.GA24998@ph> <87r5i34v51.fsf@ft.bewatermyfriend.org> <20100812173356.GC24998@ph> <100812160702.ZM20648@torch.brasslantern.com> <20100813080811.GB495@ph> <100813085709.ZM22377@torch.brasslantern.com> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.9; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=4QByPj+6Iq2k/6L54d+eVKTdgQxdscpRskJJReCfdXo= c=1 sm=0 a=DogomfpGjd0A:10 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=NLZqzBF-AAAA:8 a=DFdVGZH13mZ8dRowPioA:9 a=ZRgDAnArELDkKszRBvIA:7 a=-e--sT0FrqpBlBlU7UYDm8N3tfgA:4 a=CjuIK1q_8ugA:10 a=I6wTmPyJxzYA:10 a=_dQi-Dcv4p4A:10 a=vO-hZrrLJulMA93B:21 a=DEkV31ZC09qKIpBP:21 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 On Fri, 13 Aug 2010 08:57:08 -0700 Bart Schaefer wrote: > On Aug 13, 10:08am, Philipp Hartwig wrote: > } > } Note that in order to reproduce the issue it really seems to be > } necessary to have the 4 lines > } > } autoload -Uz compinit > } compinit > } zmodload -i zsh/complist > } bindkey '^o' menu-select > } > } in your .zshrc. Just typing them or sourcing a file containing them will > } not lead to the crash in my case, even without the "-f" option. > > Hmm, indeed. I'm finally able to reproduce this. It's also necessary to > have invoked completion once before trying menu-select, just hitting ^o > won't do it (in fact, won't do *anything*, which is slightly suspicious). Check. I won't tell you what valgrind said, it was really quite rude. That and the core dumps I got seemed to point the finger at amatches. It's not this simple, is it? It's a little difficult to see how this could be wrong, but this is the completion system we're talking about. Index: Src/Zle/compresult.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/compresult.c,v retrieving revision 1.78 diff -p -u -r1.78 compresult.c --- Src/Zle/compresult.c 24 Apr 2009 09:00:38 -0000 1.78 +++ Src/Zle/compresult.c 13 Aug 2010 20:38:07 -0000 @@ -2284,6 +2284,8 @@ invalidate_list(void) zsfree(minfo.postbr); minfo.postbr = minfo.prebr = NULL; compwidget = NULL; + nmatches = 0; + amatches = NULL; return 0; } -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/