From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20997 invoked from network); 22 Jul 1999 07:19:07 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Jul 1999 07:19:07 -0000 Received: (qmail 16153 invoked by alias); 22 Jul 1999 07:18:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7251 Received: (qmail 16146 invoked from network); 22 Jul 1999 07:18:52 -0000 Date: Thu, 22 Jul 1999 09:18:52 +0200 (MET DST) Message-Id: <199907220718.JAA03731@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 22 Jul 1999 00:50:54 +0900 Subject: Re: core dump with completion. Tanaka Akira wrote: > zsh dumps core with completion with following operation. > > Script started, file is typescript > $ ls > 7196 7217 7230 share > 7202 7218 7231 typescript > 7205 7219 7235 u2456 > 7209 7220 7241 zsh-3.1.6-test-2 > 7210 7223 bin > 7213 7226 lib > 7216 7229 man > $ bin/zsh -f > is27e1u11% bindkey -e; autoload -U compinit; compinit > is27e1u11% cvs add > is27e1u11% A=shzsh: segmentation fault (core dumped) bin/zsh -f > $ Script done, file is typescript This looked so much like 6814, that I made the patch below even though I couldn't reproduce it either (and this time neither on the DEC box, nor on my Linux-Laptop). The patch isn't dangerous, so should probably be applied even if Tanaka says that it doesn't fix the bug. Tanaka, could you try it? (Does it SEGV in callcompfunc() now?) If we still get the bug, I'd be interested in the values stored in the owords arrays in previous stack frames of comp_wrapper() -- and in the values of clwords, clwsize, clwnum, and clwpos. Hm, can't think of more just now... Bye Sven diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c --- os/Zle/zle_tricky.c Tue Jul 20 11:36:54 1999 +++ Src/Zle/zle_tricky.c Thu Jul 22 09:10:19 1999 @@ -4610,8 +4610,11 @@ kset |= CP_PARAMETER; if (!clwpos) { clwpos = 1; + clwnum = 2; zsfree(clwords[1]); clwords[1] = ztrdup(s); + zsfree(clwords[2]); + clwords[2] = NULL; } aadd = 1; break; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de