From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14747 invoked from network); 24 Aug 2001 09:24:39 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 Aug 2001 09:24:39 -0000 Received: (qmail 25407 invoked by alias); 24 Aug 2001 09:24:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15705 Received: (qmail 25395 invoked from network); 24 Aug 2001 09:24:32 -0000 From: Sven Wischnowsky MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15238.7478.654563.466540@gargle.gargle.HOWL> Date: Fri, 24 Aug 2001 11:24:06 +0200 To: zsh-workers@sunsite.dk Subject: PATCH: Re: seg fault with compstate param In-Reply-To: <1010823175131.ZM25800@candle.brasslantern.com> References: <3B84D286.B14D2642@yahoo.co.uk> <1010823162607.ZM25653@candle.brasslantern.com> <1010823175131.ZM25800@candle.brasslantern.com> X-Mailer: VM 6.92 under 21.1 (patch 3) "Acadia" XEmacs Lucid Bart Schaefer wrote: > On Aug 23, 4:26pm, Bart Schaefer wrote: > } Subject: Re: seg fault with compstate param > } > } On Aug 23, 10:53am, Oliver Kiddle wrote: > } } > } } In either 4.0.2 or recentish 4.1 putting the command `typeset compstate' > } } in a completion function causes it to seg fault. > } > } What you did was declare a local variable named compstate that was not an > } associative array. > > That's not quite accurate. The compstate array did retain its special > properties when made local. But it was equivalent to `compstate=()', > which also causes a core dump. Oops. Better test if we get a table at all. Bye Sven Index: Src/Zle/complete.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/complete.c,v retrieving revision 1.18 diff -u -r1.18 complete.c --- Src/Zle/complete.c 2001/07/25 14:49:33 1.18 +++ Src/Zle/complete.c 2001/08/24 09:23:46 @@ -1072,6 +1072,9 @@ struct value v; char *str; + if (!ht) + return; + for (i = 0; i < ht->hsize; i++) for (hn = ht->nodes[i]; hn; hn = hn->next) for (cp = compkparams, -- Sven Wischnowsky wischnow@informatik.hu-berlin.de