zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: crash/memory corruption when completing dynamic named directory
Date: Sun, 27 Mar 2011 21:47:59 -0700	[thread overview]
Message-ID: <110327214759.ZM26228@torch.brasslantern.com> (raw)
In-Reply-To: <AANLkTinOF8x4XY8dtiPUkN=MaAcnyN59a_9yujM5KQAo@mail.gmail.com>

On Mar 27,  1:32pm, Mikael Magnusson wrote:
} Subject: Re: crash/memory corruption when completing dynamic named directo
}
} Would you believe that accessing $CURSOR from within a completer will
} actually unmetafy zlemetaline in place? :)

I don't disbelieve it.

} pws, afaict, only the first little bit of zlemetaline is needed for
} this, ie the outcs calculation. Would it be okay to split this out to
} a separate function and call that from get_cursor and stringaszleline?
} [...]  Or does outcs actually depend on the conversion too?

I see PWS already replied, but:  It appears to me that to compute outcs
it's necessary to unmetafy the line in the MULTIBYTE_SUPPORT case, so we
are probably stuck with your patch from 28941.

} Otherwise we have to copy zlemetaline first and then run
} stringaszleline, and discard all that work, which seems silly.

It'd probably be possible to write a routine that decodes metatifed
characters on the fly and counts what they decode to, without updating
the buffer in place, but that's not what's available now.


      parent reply	other threads:[~2011-03-28  4:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26 12:54 Mikael Magnusson
2011-03-26 18:50 ` Johan Sundström
2011-03-26 22:26   ` Benjamin R. Haskell
2011-03-27 11:32     ` Mikael Magnusson
2011-03-27 11:37       ` Mikael Magnusson
2011-03-27 16:54         ` Peter Stephenson
2011-03-28  4:47       ` Bart Schaefer [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=110327214759.ZM26228@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).