Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: seg fault with compstate param
- X-seq: zsh-workers 15705
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: Re: seg fault with compstate param
- Date: Fri, 24 Aug 2001 11:24:06 +0200
- In-reply-to: <1010823175131.ZM25800@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <3B84D286.B14D2642@xxxxxxxxxxx> <1010823162607.ZM25653@xxxxxxxxxxxxxxxxxxxxxxx> <1010823175131.ZM25800@xxxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author