From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29315 invoked from network); 24 Feb 2000 16:38:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 Feb 2000 16:38:10 -0000 Received: (qmail 7733 invoked by alias); 24 Feb 2000 16:37:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9866 Received: (qmail 7725 invoked from network); 24 Feb 2000 16:37:39 -0000 Message-ID: <14517.24144.253305.834363@phl.itasoftware.com> Date: Thu, 24 Feb 2000 11:37:36 -0500 (EST) From: greg@itasoftware.com (Greg Klanderman) To: Sven Wischnowsky Cc: zsh-workers@sunsite.auc.dk, greg@itasoftware.com (Greg Klanderman) Subject: Re: segfault in 3.1.6 in completion In-Reply-To: <200002240936.KAA18383@beta.informatik.hu-berlin.de> References: <200002240936.KAA18383@beta.informatik.hu-berlin.de> Reply-To: greg@itasoftware.com X-Mailer: VM 6.62 under 21.0 "Pyrenean" XEmacs Lucid (beta62) Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII 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 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