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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29000 invoked from network); 13 Dec 2022 09:50:07 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Dec 2022 09:50:07 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1670925007; b=dN9Vu9EzMz49JMUcb6mUD6Eo5wuSbL2z9xBtSKoTmpcy69q576IOr+GubIJmLk2OfL2blMCdrX uPqsR3KnKf1jt5MKZCOv9gt1BekZhnpxxj+darwHfgCbzgFD+I2/SeQCOgthRYmC2bUoRGFItU efAKtiRc9kerVidD4Qo+lkttLVA2CZzO1Q7b+gTw3CkYjGyjm9SSxfDLiE1fEjHmEusrUaE+pF fv7oaxBNasIEVTiBz/IFzMyE20xLDvzHz0pSXGQx5kUjFSEWDAcR8CmurZYMHgUzNz60DAlUvZ WNasc0OWytOLjyGr3SQinhcQxJ3Kz3zmfomW9QeGzK2VVA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd21002-bg.im.kddi.ne.jp) smtp.remote-ip=222.227.84.18; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1670925007; bh=al2h/eez716wDYOsp/W3Oqo3sDboxlqgdJ0iMhGma50=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:References:Message-ID:Content-Transfer-Encoding:Date: In-Reply-To:From:Subject:MIME-Version:Content-Type:DKIM-Signature; b=CpJrlOzinWryoULapkosVfoRyTgSRDkdad7pvjsS6G4/097+tOCpM8PSOyk/6yCgGwnlhasaGS Yem/fIEr6PqPsdUj2LfFQOhw7xOqYCfX/Bcsss7e6tgVu2k2vcPVnOkXPZ9R7j5pA82oeJGodL tk6tL09rJHUCLegBKEVW5W4Nf29xpPeEIUcDS4/i+y7kWroVk3vSRSyW0jXcUi5r9CAUGU/plI snTQ2WSJHveV/Z2UdLiFdBHXHmbqMChifW5K104+TsTgixRxk6xtxYIcp5/Nju3ifMaw39WSht b5EgfdfcuJj0iNfOjKswxk0Z21kPukJH/WKYrct3n3k4Cg==; 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:To:References:Message-Id: Content-Transfer-Encoding:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=9YFRDswiLs1TvHyosdS7mogNUkI3AIhhuwiUibMT/Ts=; b=Is7acOdKkGnx09BQKFqwndhMgT 2E4Nkv+pdD+dlZnp6z+2//lFkMisaKKbQkUwC5o4N283k/Qd32DqUaV/X3xj+4WYWbIC3Vvihu+D5 6ojfnKK3YNdtJ7gPL/XWZQ24ruglaQgI1nJH4puWP8VN7bYcAcFulFmy0iEm/8FwzDNHnxKwmwa+1 mRu3yBkOyRKBG7Kf/RPcVf50rGc8VBA9+XdN0VTrq+RbkKbDlLatqgX4bLeaZLg5ZkrkhXq51on/2 aKKluv0U5OmdwzaCjFIL4On1dJAFcOzzVWgNkUvj8NUl03Ric9Lk9zHkDG2xoRQas+vn8uk/8pd+g D3d77gWA==; Received: by zero.zsh.org with local id 1p51vK-0005u5-0K; Tue, 13 Dec 2022 09:50:06 +0000 Authentication-Results: zsh.org; iprev=pass (snd21002-bg.im.kddi.ne.jp) smtp.remote-ip=222.227.84.18; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd21002-bg.im.kddi.ne.jp ([222.227.84.18]:55425 helo=dfmta1008.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1p51ui-0005aL-HP; Tue, 13 Dec 2022 09:49:30 +0000 Received: from mail.biglobe.ne.jp by omta1008.biglobe.ne.jp with ESMTP id <20221213094922047.VIPL.4048.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Tue, 13 Dec 2022 18:49:22 +0900 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [bug] busyloop upon $=var with NULs when $IFS contains both NUL and a byte > 0x7f From: Jun T X-Priority: 3 In-Reply-To: <351204342.6213761.1669732685914@mail.virginmedia.com> Date: Tue, 13 Dec 2022 18:49:21 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: <98F2CEB4-691A-4DA3-9B41-5341EA3E8B9B@kba.biglobe.ne.jp> References: <20221118142717.t4elzrigjeizjm6w@chazelas.org> <351204342.6213761.1669732685914@mail.virginmedia.com> To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3445.104.21) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 51203 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: Sorry for very late reply. > 2022/11/29 23:38, Peter Stephenson = wrote: >=20 >> On 29/11/2022 14:27 Jun. T wrote: >> 3834 for (; *s; r++) { = =20 >> 3835 char *ie =3D itype_end(s, ISEP, 1); =20 >> 3836 if (ie !=3D s) { = =20 >> 3837 s =3D ie; = =20 >> .... =20 >> 3840 } =20 >> 3841 (void)findsep(&s, NULL, 0); >> .... >> 3845 } >>=20 >> Here, the pointer s already points to a ISEP (\x83\x20 =3D metafied = Nul), >> but itype_end() can't find the next ISEP (ie =3D=3D s) due to the = empty >> ifs_wide, and findsep() does not move s because *s is already ISEP, >> resulting in infinite-loop with the same s. >=20 > I guess the obvious thing to do here is any time s doesn't move > give up splitting at that point. How can we 'give up'? Is it OK to call exit()?