zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.dk
Subject: PATCH: Re: seg fault with compstate param
Date: Fri, 24 Aug 2001 11:24:06 +0200	[thread overview]
Message-ID: <15238.7478.654563.466540@gargle.gargle.HOWL> (raw)
In-Reply-To: <1010823175131.ZM25800@candle.brasslantern.com>


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


      reply	other threads:[~2001-08-24  9:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-23  9:53 Oliver Kiddle
2001-08-23 16:26 ` Bart Schaefer
2001-08-23 17:51   ` Bart Schaefer
2001-08-24  9:24     ` Sven Wischnowsky [this message]

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=15238.7478.654563.466540@gargle.gargle.HOWL \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.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).