Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: pattern incremental search



*  Lawrence Velázquez <larryv@xxxxxxx> <cc93474f-4b5e-4d69-8b7a-de148913b27e@xxxxxxxxxxxxxxxx>
Wrote on Thu, 31 Mar 2022 18:44:46 -0400

> 
> On Mon, Feb 28, 2022, at 11:54 AM, Madhu wrote:
>> This doesn't fix the segfault: which just gets postponed.  Besides
>> this breaks incremental-pattern-search, which just stops working and
>> doesn't match anything in the history. Also, the segfault only occurs
>> when zsh is built without multibyte.
>>
>> To hit the segfault, in a --disable-multibyte build
>> $ zsh -f
>> $ bindkey ^R history-incremental-pattern-search-backward
>> C-r .
>>
>> Please consider the attached patch which 1) reverts the above fix, and
>> 2) modifies the non-multibyte version of igetmatch to match the
>> multibyte version at some points. (Disclaimer. this is submitted with
>> no understanding of what the code does :)
>>
>>
>> Attachments:
>> * glob.c-fix-segfault-on-non-multibyte-history-inc.patch
>
> Was this fully obviated by workers/49870 (git
>  3bf95b9)?

No. I scanned the git commit, it probably fixes the bug introduced in
"49658: Fix NULL reference in match code." but since it doesn't touch
the code path for the case where zsh is built without multibyte, it
don't believe it addresses the problem I raised at all.

I haven't tried master yet, The steps I gave for reproducing the
problem are very basic produce a segfault everytime. If you can try it
out with a non-multibyte build I'm sure you will hit it.




Messages sorted by: Reverse Date, Date, Thread, Author