From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13080 invoked from network); 1 Apr 2022 02:25:54 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Apr 2022 02:25:54 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1648779954; b=XGNv+5Ck5aoO970fO5kfMjtZ1SGpbAshClCLflE7aoLbLlMjwHuA6P49UVZBZwAnXxL5Sk9Sna u8qqv470Kyz/KFjtfMYkMmtcvPr3zbi3A7Lo8qZ3RQpkO7g7aoPsw3zalDPcsNWmk7gZxW6cCH QEqN+i0UInEMWpJmPUMrsE54eE4wyqrrREg/oxk38yKWeOHxvzLOUGdOY5tSyBRkgc/P+4YmkS llMJXZnEAKDpTau2dCzJeyCG2fWbYXw71mPFI9yXqc4Lf7UN8UItQiiGDEnwF7mRdNZjjBKSff iAWaj7gLeSrZZNqCQBbAFfXqIMjZVyOBDQmqOpOQFTxt4w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtp7.ctinetworks.com) smtp.remote-ip=205.166.61.237; dmarc=none header.from=meer.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1648779954; bh=vbKKomg57iD0n1ikrckMF1jqHnlOKcKVOHknTgYwN0A=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: References:In-Reply-To:From:Subject:Cc:To:Message-ID:Date:DKIM-Signature; b=ESKovZKEP5P2adbBK+Hn4aBokxurgPKd8dS4y6a4AAc/swsBFX4mBWjoAYfOn/oxxjVVxUa4O3 F6iV0+eOvX+WimNjEJZhO8P45F5ZNNo0A4NxEEknw6spRp+hhLSFvOVroBg8/c1vY4kGhh/6Xk R/FmxTcgZ2hUQw9tehycFFBJLjWD6Ox4FTyv9WN2NhDIawx4S0nqCdiNBZ/E+mHe24CZ6rN7hJ SohybFFkbZmEMbFQllqrL99gHl/rhzm1CqtL4Q/qdHWoUTm0uIAy0j2l3frashdO2ZZHwIA+rO RY3uxXTHw64BBGPhfKexIjByZ1aDn6tLxrmm1k0ecRpsYQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Mime-Version:References:In-Reply-To:From:Subject:Cc:To: Message-Id:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=6L1U7eo8BGCXWcWHVoCbxNXK6cXMrBu0RQMVx777nWU=; b=NFjQz1WfwYWDICtGWOD3rKW6ud lN8HXrnWpIGtXwXEiNY/1rL8S9G+4e0VLujadmcBDa7oYVX5Ofapy4g9yiTAFN2LrKZT7Q7VKXd46 ClL8lqlrJBiEsuI/6FVqcsCZLqHv4RXH9jinFENwIINSpRxuSklBGtTEDDUQwXqV2mC6uXQR9sHJO fyHHoKcqykLY9RpNpDJ2CLc/0DXSJ5QSD8fW8qlIN4es6f6WejY89FBkb+BwJq90oeS2wytPRtrkR jURxNFhX7corUv6+p2hhytkEyMUkT5g9ufTnS9HJkIz3juD7kOF3+aUMt9EvIsr7PpdaPRQS6NJOA i/5N4H1A==; Received: from authenticated user by zero.zsh.org with local id 1na6z2-000M08-Py; Fri, 01 Apr 2022 02:25:52 +0000 Authentication-Results: zsh.org; iprev=pass (smtp7.ctinetworks.com) smtp.remote-ip=205.166.61.237; dmarc=none header.from=meer.net; arc=none Received: from smtp7.ctinetworks.com ([205.166.61.237]:35466) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1na6yU-000Lgp-Qk; Fri, 01 Apr 2022 02:25:20 +0000 Received: from localhost (unknown [117.254.35.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: enometh@meer.net) by smtp7.ctinetworks.com (Postfix) with ESMTPSA id B4A22122EEA; Thu, 31 Mar 2022 22:25:11 -0400 (EDT) Date: Fri, 01 Apr 2022 07:55:20 +0530 (IST) Message-Id: <20220401.075520.1210015109905370739.enometh@meer.net> To: larryv@zsh.org Cc: zsh-workers@zsh.org Subject: Re: PATCH: pattern incremental search From: Madhu In-Reply-To: References: <1514882387.357077.1640002234148@mail2.virginmedia.com> <20220228.222457.2128269761925169168.enometh@meer.net> X-Mailer: Mew version 6.8 on Emacs 29.0.50 Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-ctinetworks-Information: Please contact the ISP for more information X-ctinetworks-MailScanner-ID: B4A22122EEA.A6EB2 X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-SpamCheck: X-ctinetworks-Watermark: 1649643916.60731@d9AjF0a6kAs1VoNQsaK/Ww X-Seq: 49952 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: * Lawrence Vel=E1zquez 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 occur= s >> 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, a= nd >> 2) modifies the non-multibyte version of igetmatch to match the >> multibyte version at some points. (Disclaimer. this is submitted wit= h >> 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.