zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: Segfault in hrealloc somewhere between rpromts and syntax highlighting
Date: Sun, 6 Apr 2014 18:06:30 +0100	[thread overview]
Message-ID: <20140406180630.481e3710@pws-pc.ntlworld.com> (raw)
In-Reply-To: <140406095053.ZM8586@torch.brasslantern.com>

On Sun, 06 Apr 2014 09:50:53 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> I suppose it's possible that this hunk of my patch is related:
> 
> > @@ -2795,6 +2795,7 @@ doexpandhist(void)
> >      if (!err) {
> >  	zlemetacs = excs;
> >  	if (strcmp(zlemetaline, ol)) {
> > +	    zle_restore_positions();
> >  	    unmetafy_line();
> >  	    /* For vi mode -- reset the beginning-of-insertion pointer   *
> >  	     * to the beginning of the line.  This seems a little silly, *
> 
> If the highlight positions were not properly restored, highlighting might
> reference non-existent parts of the line?  But then I would have expected
> that incorrect highlighting would be a visible symptom in some cases.
> 
> In any event, Peter, I'd appreciate it if you took a closer look at that
> particular change (zle_tricky.c) because it's the only one where I'm not
> certain I was able to repeat the steps that caused the complaint after I
> made the edit.

Looks unimpeachable --- save and restore have to be paired.

But yes, you might think a failure there would be pretty catastrophic,
certainly not just show hard to reproduce problems in hrealloc().

Still, it would be interesting to get a fresh report after this fix.

pws


  reply	other threads:[~2014-04-06 17:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-30 13:13 Sebastian Götte
2014-04-06  7:05 ` Bart Schaefer
2014-04-06 16:02   ` Peter Stephenson
2014-04-06 16:50     ` Bart Schaefer
2014-04-06 17:06       ` Peter Stephenson [this message]
2014-04-12 17:29   ` Jun T.
2014-04-13  1:35     ` Bart Schaefer

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=20140406180630.481e3710@pws-pc.ntlworld.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.org \
    /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).