zsh-workers
 help / color / mirror / code / Atom feed
From: greg@itasoftware.com (Greg Klanderman)
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
Cc: zsh-workers@sunsite.auc.dk, greg@itasoftware.com (Greg Klanderman)
Subject: Re: segfault in 3.1.6 in completion
Date: Thu, 24 Feb 2000 11:37:36 -0500 (EST)	[thread overview]
Message-ID: <14517.24144.253305.834363@phl.itasoftware.com> (raw)
In-Reply-To: <200002240936.KAA18383@beta.informatik.hu-berlin.de>


Thanks Sven,

However I don't see code anything like that in 3.1.6 compctl.c ... 
I'm assuming that patch is wrt current development code?

Greg

>>>>> "Sven" == Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:

> Greg Klanderman wrote:

>> Start 3.1.6 with no init files and load the below attached completion
>> functions.  Now if you go into a directory containing CVS controlled
>> files and try
>> 
>> % cvstest foobar/
>> 
>> (where foobar is some directory) and hit TAB you get a crash 
>> 
>> Program received signal SIGSEGV, Segmentation fault.

> Oops. compctl didn't stay up-to-date with respect to optimised
> match-storing.

> And then there was the problem that the display list wasn't stored.

> Bye
>  Sven

> diff -ru ../z.old/Src/Zle/compctl.c Src/Zle/compctl.c
> --- ../z.old/Src/Zle/compctl.c	Thu Feb 24 09:54:17 2000
> +++ Src/Zle/compctl.c	Thu Feb 24 10:32:41 2000
> @@ -3763,10 +3763,11 @@
>  	    for (ln = firstnode(matches); ln; ln = nextnode(ln)) {
>  		m = (Cmatch) getdata(ln);
>  		if (m->ppre) {
> +		    char *s = (m->psuf ? m->psuf : "");
>  		    char *p = (char *) zhalloc(strlen(m->ppre) + strlen(m->str) +
> -					      strlen(m->psuf) + 1);
> +					      strlen(s) + 1);
 
> -		    sprintf(p, "%s%s%s", m->ppre, m->str, m->psuf);
> +		    sprintf(p, "%s%s%s", m->ppre, m->str, s);
>  		    addlinknode(args, dupstring(p));
>  		} else
>  		    addlinknode(args, dupstring(m->str));
> @@ -3799,6 +3800,9 @@
>  		endcmgroup(yaptr);
>  		begcmgroup("default", 0);
>  	    }
> +	} else {
> +	    endcmgroup(yaptr);
> +	    begcmgroup("default", 0);
>  	}
>      } else if ((tt = cc->explain)) {
>  	tt = dupstring(tt);

> --
> Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


  reply	other threads:[~2000-02-24 16:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-24  9:36 Sven Wischnowsky
2000-02-24 16:37 ` Greg Klanderman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-02-24  0:34 Greg Klanderman

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=14517.24144.253305.834363@phl.itasoftware.com \
    --to=greg@itasoftware.com \
    --cc=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).