zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers mailing list <zsh-workers@zsh.org>
Subject: Re: segfault on menu-select
Date: Fri, 13 Aug 2010 21:43:57 +0100	[thread overview]
Message-ID: <20100813214357.012f7f35@pws-pc> (raw)
In-Reply-To: <100813085709.ZM22377@torch.brasslantern.com>

On Fri, 13 Aug 2010 08:57:08 -0700
Bart Schaefer <schaefer@brasslantern.com> 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 <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


  reply	other threads:[~2010-08-13 21:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-12 14:46 Philipp Hartwig
2010-08-12 14:53 ` Frank Terbeck
2010-08-12 15:20   ` Philipp Hartwig
2010-08-12 15:49     ` Frank Terbeck
2010-08-12 16:53       ` Philipp Hartwig
2010-08-12 17:07         ` Frank Terbeck
2010-08-12 17:33           ` Philipp Hartwig
2010-08-12 18:04             ` Frank Terbeck
2010-08-12 23:07             ` Bart Schaefer
2010-08-13  8:08               ` Philipp Hartwig
2010-08-13 15:57                 ` Bart Schaefer
2010-08-13 20:43                   ` Peter Stephenson [this message]
2010-08-15 20:43                     ` Bart Schaefer
2010-08-15 22:34                       ` Bart Schaefer
2010-08-31 14:33                         ` Philipp Hartwig
2010-09-06  4:11                           ` Bart Schaefer
2011-01-09 18:56                             ` Philipp Hartwig
2011-01-09 19:54                               ` Bart Schaefer
2011-01-09 20:57                                 ` Philipp Hartwig
2010-08-12 16:04   ` Bart Schaefer
2010-08-12 17:03     ` Philipp Hartwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100813214357.012f7f35@pws-pc \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).