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 12060 invoked from network); 13 Apr 2023 16:41:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Apr 2023 16:41:06 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1681404066; b=dfYaiVZc+XuRO0mf12rwX7peioI+/tA1Y5o7UvBRdqqHTU5VtInyX4jEAsE3MxZ/IneQTUSoIX e2/4JCLqZJNHYw3RivQ/TjldvIxMMa7bZ+n0wCkKKApcLbhbpPrX1f2mMmz7qXwuRZNQPKddMa m8LcvQElp0+93l2HnFb3BgcrSRoXoP3eB3H7M1GyGkKdXKL2x5mhKvigO3V9wHYaR5BdoPD4mm uHRZhSuJv0udHwWKXTTfDDTh/oqQD5cb6Hi7veV/vCvHfpdDVFireANRPvjskPK46sll9R858Z k41Nu8/hpFYEQf0EGNDiGvlrJj6HbESBafV+BTSIjqiwYQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd00010-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.10; 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=1681404066; bh=8c6kTh4zT06Sd3vnWMeXz2oQClJl9G2aitjHwyhNbAE=; 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=mynI/gTlt26yMfaMi5I9E9UfY+psMvA+JgJoFPdlQf+h2PT7n7F8UxzbxiFCOFiElehONI4o+B HC+pyXqZ+G5QtUt1/gquRrueNWv1HBz0GU7nwpQo9lvSPP7Br6Wtdi7aGM+jopl1A1JLn9Pd/z nx83wXLRnNdddCVoiEEAPqPtFx5mJum41XeEaultIk0E2lRJM7plpPOkRz5J6d5z4CD/D0Tt8V WU0Wlw/hqNUsC4XhyTHbaSFGOcgs++HZgcMvTL/izCUPlPzZHbxzU7HyLBJBgN9ti7jtkpLhg1 MyYCrQSJxuMjbPL91mE9eUn0MdB5vp0/N96zPPRG+ujivA==; 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=aUDjRxuRau66KrRt2Hrof+3qVyqASQUtFwCdF4Fp5Mo=; b=UlsVy/uC9T6LQwNoPrzs2BSfMu 7YzW5SxrHUz6DWFi66ljqEQ8ds1qRcvVeGyxXjlpJ1tVQVPgbKlSPh7+XAHndl0W1MhJAVaJGnVEi fhk1kbI04UO5CdtTP1KDAiddAJt+oGlTKz8NWQIoCZku7YGtQpVd7sL9gL4dUuA1NPLpDtRGGUpOn NM07sBShwEFSxwks+mGMEMnHWmnNNVeMR3nNSV/Ms5dNGoquJwrSVTPkpQ29yiAgsHNdF99xWioDT 4de4LwNH4h6A7e518pVpg27id6r/tXpNThtkJ9YuGz1L6FPmtRl2ZoPxcM4eWqSNEnFSVXKxCPjSc wbEPxb/w==; Received: by zero.zsh.org with local id 1pn00P-0004yD-L0; Thu, 13 Apr 2023 16:41:05 +0000 Authentication-Results: zsh.org; iprev=pass (snd00010-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.10; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd00010-bg.im.kddi.ne.jp ([27.86.113.10]:18817 helo=dfmta0001.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pmzzm-0004fB-N3; Thu, 13 Apr 2023 16:40:30 +0000 Received: from mail.biglobe.ne.jp by omta0001.biglobe.ne.jp with ESMTP id <20230413164020360.GYFO.128335.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Fri, 14 Apr 2023 01:40:20 +0900 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.2\)) Subject: Re: Probabilistic crash on zsh 5.9 on x86_64 From: "Jun. T" X-Priority: 3 In-Reply-To: <2083513891.2014577.1681394631032@mail.virginmedia.com> Date: Fri, 14 Apr 2023 01:40:19 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: <852F8278-39A7-4305-91C1-B9788352E061@kba.biglobe.ne.jp> References: <48A7DCE2-AEC1-4777-949C-50917EDCECB1@kba.biglobe.ne.jp> <5C4788C8-4E40-4565-AFE8-84D57949BC8C@ntlworld.com> <267594676.4158370.1681382869709@mail.virginmedia.com> <1621107110.4161180.1681384345108@mail.virginmedia.com> <78EBC2C7-5645-4D35-B285-F140228D444C@kba.biglobe.ne.jp> <1865187346.2010280.1681391961060@mail.virginmedia.com> <2083513891.2014577.1681394631032@mail.virginmedia.com> To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3696.120.41.1.2) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 51650 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: > 2023/04/13 23:03=E3=80=81Peter Stephenson = =E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB: >=20 > Have a look at this --- it simply marks the prog in the shell function = as > in use earlier and unmarks it later, so the shenanigans within to do > with traps all come out in the wash. So, in theory, there's not much > to go wrong. But let me know... > + marked_prog =3D shfunc->funcdef; > + useeprog(marked_prog); (snip) > + freeeprog(marked_prog); Even with this, shfunc is still freed, although shfunc->funcdef is not = freed. But doshfunc() continues to use shfunc, at lines 5854, 5954, 5957, etc. If it doesn't crash, it means the freed memory is not yet used by = others. But I think this is unsafe, and valgrind gives lots of warnings.