help / color / mirror / code / Atom feed
From: Madhu <enometh@meer.net>
To: larryv@zsh.org
Cc: zsh-workers@zsh.org
Subject: Re: PATCH: pattern incremental search
Date: Fri, 01 Apr 2022 07:55:20 +0530 (IST)	[thread overview]
Message-ID: <20220401.075520.1210015109905370739.enometh@meer.net> (raw)
In-Reply-To: <cc93474f-4b5e-4d69-8b7a-de148913b27e@www.fastmail.com>

*  Lawrence Velázquez <larryv@zsh.org> <cc93474f-4b5e-4d69-8b7a-de148913b27e@www.fastmail.com>
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.

  reply	other threads:[~2022-04-01  2:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-26 19:41 Peter Stephenson
2008-04-26 20:22 ` Peter Stephenson
2008-04-26 20:35   ` Peter Stephenson
2008-04-26 20:51     ` Peter Stephenson
2008-04-26 23:52 ` Bart Schaefer
2008-04-28  1:35 ` Geoff Wing
     [not found] ` <CAHYJk3Q5x=5Zn5kURXDDgLLoSEsro45_G=SZB-P+qX_qk7dn-Q@mail.gmail.com>
2021-12-20  3:40   ` Mikael Magnusson
2021-12-20 12:10     ` Peter Stephenson
2022-02-28 16:54       ` Madhu
2022-03-31 22:44         ` Lawrence Velázquez
2022-04-01  2:25           ` Madhu [this message]
2022-04-01  3:49             ` Bart Schaefer
2022-04-01 18:23               ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220401.075520.1210015109905370739.enometh@meer.net \
    --to=enometh@meer.net \
    --cc=larryv@zsh.org \
    --cc=zsh-workers@zsh.org \


* 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


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).