Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: crash/memory corruption when completing dynamic named directory
- X-seq: zsh-workers 28947
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: crash/memory corruption when completing dynamic named directory
- Date: Sun, 27 Mar 2011 21:47:59 -0700
- In-reply-to: <AANLkTinOF8x4XY8dtiPUkN=MaAcnyN59a_9yujM5KQAo@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <AANLkTi=qwPYqiwCGVw=vkN75JUFntDDrLgiO-CjYQQH9@mail.gmail.com> <AANLkTi=DsVZv5J2m26e86XgaD3qJtRtWMfDdWEoh3baD@mail.gmail.com> <alpine.LNX.2.01.1103261818320.22141@hp> <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author