zsh-workers
 help / color / mirror / code / Atom feed
From: hzoli@cs.elte.hu (Zoltan Hidvegi)
To: zsh-workers@math.gatech.edu (zsh-workers)
Subject: Re: COMPLETE_IN_WORD dumps core if reserved word match
Date: Mon, 7 Aug 1995 16:06:05 +0200 (MET DST)	[thread overview]
Message-ID: <9508071406.AA07721@turan.elte.hu> (raw)
In-Reply-To: <m0sfQiU-00007BC@aglaia.snafu.DE> from "Thorsten Meinecke" at Aug 7, 95 01:51:33 pm

Thorsten Meinecke wrote:
> I wrote, 
> Subject: COMPLETE_IN_WORD dumps core if built-in functions match,
> 
> >   Starting program: /u/home/kaefer/wrk/zsh/zsh-2.6-beta10/Src/./zsh -f
> >   aglaia:~/wrk/zsh/zsh-2.6-beta10/Src> setopt autolist completeinword 
> >   aglaia:~/wrk/zsh/zsh-2.6-beta10/Src> rt
> >                                         ^
> > [cursor position is here, and completion requested]
> > 
> >   Program received signal SIGSEGV, Segmentation fault.
> >   0x804ed39 in addmatch (s=0x8059424 "epeat", t=0x8059424 "epeat")
> >       at zle_tricky.c:1524
> >   1524                *e = '\0';
> >   (gdb)
> > 
> > The obvious way around (at least for GCC) is to recompile with
> > -fwritable-strings.
> 
> Digging a little further shows that only the list of 24 reserved
> words is subject to this problem. We're attempting to modify
> "string constants", which can't be done portably.
> 
> The fix is to copy these words, at the expense of a-hundred-and-a-
> few bytes increased memory usage, as it was done in earlier releases.

I think it would be better to modify the code which uses the end-of-string
marks. I do not like new ztrdups. Also it requires some additional CPU time as
well (malloc can be quite slow, especially with zsh-mem, which queues signals
befor each malloc). The proper solution shouldn't be too difficult, be I have
some other things to do now.

Zoltan


  reply	other threads:[~1995-08-07 14:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-07-29 14:22 COMPLETE_IN_WORD dumps core if built-in functions match Thorsten Meinecke
1995-08-07 11:51 ` COMPLETE_IN_WORD dumps core if reserved word match Thorsten Meinecke
1995-08-07 14:06   ` Zoltan Hidvegi [this message]
1995-08-08 11:36   ` P.Stephenson

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=9508071406.AA07721@turan.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=zsh-workers@math.gatech.edu \
    /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).