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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham
autolearn_force=no version=3.4.4
Received: (qmail 12528 invoked from network); 13 Apr 2023 16:55:51 -0000
Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368)
by inbox.vuxu.org with ESMTPUTF8; 13 Apr 2023 16:55:51 -0000
ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1681404951;
b=SO/KCUbYCag/dgEE0Rl8i9gSUD31ZYZOn+xuiBYzDiicCmAgeVxCSP/Zg3eoLZFYvI+OizPEZm
yuHHFMOAJT7d9yKdVQ4vTaPv3ypmkyTNxWi0ioodL0ms1Kgpq+DPgOkkA+0wbnBAfBmaDcwkfI
bzdwGrz6PA2OBrmo8BbzbUOWk+CSx9zEaQr8E5XX0eczX7vA8uPOICKIVUvLVBbTos/yDJrpWx
nAt83r5Gtu9v9rpCcluZ/F5vOUhTvO0uHXFZnMgigwDaEWOj64tPriZdhoUGmqCAC4Bg5tc8+r
KpBlrUY8xjtOxBUNOqQskc7SBZh2M+7RS0sFPHnglTg/CA==;
ARC-Authentication-Results: i=1; zsh.org;
iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1681404951;
bh=ot+2itF1bf+eVCtvZ/bmUSnBg4SqxujUg8KhP0y51HA=;
h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help:
List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:
References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature:
DKIM-Signature;
b=ZX3JYm8rxb+aGi9tFq+/YJc7wVq/lZusDxIA9djqPnqwwXOqRmSOcLs3VcoMVGMPIsZg5O5/WX
k9JqqUOSP31oCPrwvqlPWhJEIVbf/sWCJFcuv23wxQLZcXwLBlyIL7/idVPS88SMOiDlLOg2rS
6bDQU2omxItXd30tlFiblTnXW0Kk4t2zpexkadawNxWUqXvuztA2fpKax3f7/bniComL3TWbjg
H3DTMyfLUpUm7eWuKOFoh5QIrtp7spSkmJWdBd5KX0sV98xOIJ9taTJ3C+sSDCfpx0GJN1Vgmm
fclpJiHQX2Z0Lco80hc6SRRxt0/etFtjbq0+HyK6soFyvQ==;
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:Subject:References:In-Reply-To:Message-ID:To:From:
Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID;
bh=V8+UkaB16VO56IXurOr2+1QsX1mrDossEbXmlMMwyfc=; b=hwQvWgKa/xtdPmEUFlu21WZQZD
2/btwj27hAM1Yg04FgSNxFfuUgu2AHJrrMZaYNmF80DDUMG2Njw6hpnn//wlZOssdS8hWW0vGnjEJ
PgfJHGnydtmFwJcT64eq+aVgsSfVGL+3S6C9VKz//bzozQR5lrgjN2O+DyEdE4HnuiDawD1yps1ld
FJsLQyOizNxaWQPxFJw2QrU0aZ3pkfdcmLLZHpW3QAUteQIEnasN2Pe3OjquTFGjGHbAPBTQjn9sz
BiSvpBAPLRUI3Vk80kG9NZOgRUapOK/vkbrMZFsbdsw+GDqJgCRihu7bb9Bw7rdGW7C9ctEdwU5CR
yo/A+SFA==;
Received: by zero.zsh.org with local
id 1pn0Eg-0006CA-Uo;
Thu, 13 Apr 2023 16:55:50 +0000
Authentication-Results: zsh.org;
iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
Received: from smtpq2.tb.ukmail.iss.as9143.net ([212.54.57.97]:49724)
by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
id 1pn0EN-0005sj-63;
Thu, 13 Apr 2023 16:55:33 +0000
Received: from [212.54.57.80] (helo=smtp1.tb.ukmail.iss.as9143.net)
by smtpq2.tb.ukmail.iss.as9143.net with esmtp (Exim 4.90_1)
(envelope-from
)
id 1pn0EM-0001UQ-Mf
for zsh-workers@zsh.org; Thu, 13 Apr 2023 18:55:30 +0200
Received: from oxbe9.tb.ukmail.iss.as9143.net ([172.25.160.140])
by smtp1.tb.ukmail.iss.as9143.net with ESMTP
id n0EMp8cJ0tFi3n0EMpMXYW; Thu, 13 Apr 2023 18:55:30 +0200
X-Env-Mailfrom: p.w.stephenson@ntlworld.com
X-Env-Rcptto: zsh-workers@zsh.org
X-SourceIP: 172.25.160.140
X-CNFS-Analysis: v=2.4 cv=cdQU7FPM c=1 sm=1 tr=0 ts=64383402 cx=a_exe
a=3Amxf2QPfMiVt6ICWsHjRQ==:117 a=wbvTLvLwOfMA:10 a=IkcTkHD0fZMA:10
a=NLZqzBF-AAAA:8 a=KDeFFABeuWscKNIxALUA:9 a=QEXdDO2ut3YA:10
a=RchoEgWomvYJfgJ0MydD:22
X-Authenticated-Sender: p.w.stephenson@ntlworld.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com;
s=meg.feb2017; t=1681404930;
bh=ot+2itF1bf+eVCtvZ/bmUSnBg4SqxujUg8KhP0y51HA=;
h=Date:From:To:In-Reply-To:References:Subject;
b=TO6Xnhb/aouRmL5RpdEgvsllE+7l2iTe7NcagkXA9vpIuh1adL3eWkrJ9Lmf2KKRh
IhQ3g90qtk7VWQ/MNNMfWNvi/fuMuEc+Sw+aDf9+er1/JLQeMKNbjSkZ4lTRqQ7h7Y
qwGZtJ5666bC0b1RteJIyqf0RJO0K+X2/t8rDkzhGlsarJht9BwDUmEFLGCXWIT6lq
fusRMKPjbjH+Z7kr7krgbFJ9+Cfps5AxWB5nk9a7MjnAM/h0bdNF+WgtbQflT3tAzE
OT/1E6Hpi72WG3SWAlO8go8wrgQnEhwaxo3LpJ1a9QPkTW4sv0kdog/Rfx9QsjtKr/
CB51blmqYpxfw==
Date: Thu, 13 Apr 2023 17:55:30 +0100 (BST)
From: Peter Stephenson
To: zsh-workers@zsh.org
Message-ID: <2002382304.4711947.1681404930419@mail.virginmedia.com>
In-Reply-To: <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>
<852F8278-39A7-4305-91C1-B9788352E061@kba.biglobe.ne.jp>
Subject: Re: Probabilistic crash on zsh 5.9 on x86_64
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
Importance: Normal
X-Mailer: Open-Xchange Mailer
X-Originating-IP: 147.161.167.85
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfOEfOBDG6qW3Twm9ILYNN5VphNU5bcffBzppj9A4Qu8bUs9ekBJegfFZh9XB7VURHw0KnSXgYhsZoIX91KIHIdJujcd6FT41Tnl/p8booob4oLzLuxlW
1asvlqMvke1Vb8GDno+8QMKg89/t8OMcrAMAOA0YF4sjUZ+Ud6wh/dLj9BbFxlesTvZ2puJggcebu2XpdF3Lhjde/ZarHmbpSwC1WgUrOJVyrinFQPF8cGRB
X-Seq: 51651
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:
> On 13/04/2023 17:40 Jun. T wrote:
>=20
> =20
> > 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...
>=20
> > + marked_prog =3D shfunc->funcdef;
> > + useeprog(marked_prog);
> (snip)
> > + freeeprog(marked_prog);
>=20
> Even with this, shfunc is still freed, although shfunc->funcdef is not fr=
eed.
> 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.
OK, so the starttrapscope() just above that point is pulling the rug out
from under the function's feet. We've looked up the TRAPEXIT function and
now that function's just been undefined.
So some better save / restore for the shell function is probably needed.
pws