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,UNPARSEABLE_RELAY
autolearn=ham autolearn_force=no version=3.4.4
Received: (qmail 29594 invoked from network); 22 Sep 2021 15:02:16 -0000
Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368)
by inbox.vuxu.org with ESMTPUTF8; 22 Sep 2021 15:02:16 -0000
ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1632322936;
b=q3sIOjSfNBf7mSa3/xiGd+9j4f7t5r71VqXHKfxsJNFf7MmmCe1LLCRT6lQpI30JyKCbAVRlkg
ouo9zWamH74XtGXX/gaJ4TVk2ily6TqD4j2cebaCGe8TSqdM2nEh4JBm0Kn+aDoWgOJeccFlUf
UN1kxqEaFqUn8s+NYxbGtmMsnlPtbOVSvLPf6y4mY9Hi2uVD3NB62ycClJZ9LcVIxI6jU1wxyp
ATs5WT7R6pvnXrHp+QHBs0cKo3WJX0/nBDve5D60Hx6HsqlKrtiYeF2QcqgDnb5r25l2tK9ZGM
rSwh3OiaM/9GjqZbQ1ryLLhpfOjsJ2w2WcN+T9Y58c6pwg==;
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=1632322936;
bh=A8l1KzxptA8PdldgkAKSRhVHbLJhURZIJiaOLfmJUjY=;
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=U5VfK1/TLo0TVlVi/ptxsCAP0Bt+ZcCG8QmVfbm06zV88P6H/QTpxOaPWO2+dapMUYggSPPqcU
xMT8oQSQbBdH5vSKUGSLDZcfWbJ3nbDPdrlCaf18WEVwl4RcFSOSvIudPNyI8KLxdHM7ezuudt
cidXrPe/k4XyRUu3gXrrEdNEtjpFV4RYkh48LWEqzWMiJxwvVMXrnQzW0/2Gdibk7WtYcCFseE
I4m+Ch/YT+sOmw2M7R0Uht68h7YzmBQ4epwQPjLFaxK5Vrq2dneX3IZ1nT6PKmp32GrTIHhxDv
ENVDCjV/Sk61m6P6p83J50ikSIivC1b5XrsgQzgrV2OejQ==;
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=GyRy3ad52X0jwymiX8PylnNQhg7qfUaC6WD/4QqYZ/w=; b=BLaxy0IiS23d0zVGR9WIZHeAUR
sCkaJCbs3Us3mDH5h/bkmJOGhrTFtZ99SO8QzyUDGxvz4vkRsss1LUPwedIh0r7yFJ4PFx7Yu44+d
2H2wXYS8pjrb9bmkCKdhnChanCvZ6Hs2zvVLE1nAWFxA+dPJKP0dG9LdvdYMB9dv4h85KXXLL6eNC
lDs7937kI8C8BKfqCu6NZe08CGGwztem191FDFqmz4YMHEtUVZHHdfMlsgC7wp0LQanb4EQU1mPQM
qbpsxcJ4top6FiIjg8KX9AxauK6UM12vn23GgH8P1gyQzLI60o1pQQ2Z4ESl3zP84UJ/0wBgAqePk
9/s2VgOQ==;
Received: from authenticated user by zero.zsh.org with local
id 1mT3lH-0004zT-SS; Wed, 22 Sep 2021 15:02:15 +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]:45534)
by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
id 1mT3ku-0004fR-0r; Wed, 22 Sep 2021 15:01:53 +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.86_2)
(envelope-from
)
id 1mT3kt-000246-9l
for zsh-workers@zsh.org; Wed, 22 Sep 2021 17:01:51 +0200
Received: from oxbe8.tb.ukmail.iss.as9143.net ([172.25.160.139])
by smtp1.tb.ukmail.iss.as9143.net with ESMTP
id T3ktmgF5XhdxkT3ktmW9Xd; Wed, 22 Sep 2021 17:01:51 +0200
X-Env-Mailfrom: p.w.stephenson@ntlworld.com
X-Env-Rcptto: zsh-workers@zsh.org
X-SourceIP: 172.25.160.139
X-CNFS-Analysis: v=2.4 cv=Ru2mkAqK c=1 sm=1 tr=0 ts=614b455f cx=a_exe
a=pgSR3NrKiwmx/6vnWRL19w==:117 a=sfM75MaK4YAA:10 a=IkcTkHD0fZMA:10
a=2y5beTJ5bSgA:10 a=q2GGsy2AAAAA:8 a=pGLkceISAAAA:8 a=J4Lt0O8D7r4091ha-l8A:9
a=QEXdDO2ut3YA:10 a=z9dJwno5l634igLiVhy-: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=1632322911;
bh=A8l1KzxptA8PdldgkAKSRhVHbLJhURZIJiaOLfmJUjY=;
h=Date:From:To:In-Reply-To:References:Subject;
b=VJLzizxjD1Z+v1ujUKsaTxg1G/pKyIPgG0Uf3fw4ci6ezxxLiQC11HfAdJU42Ze48
zI73Y4rZwR03tYKrGQysuvE/DmJVLi0ZxW2QlPPbx709GTR5owOmT5ncE+VYkUJ9Yi
ltNGGOAkOMQvKdCHvZtXpEyeyOUp/jXLM7Hld9dEhpuJuuWtoxPVTTFHF8I6pU7xZI
zbjIjyovCOQPyiFVVsEYqJP2kpuwfW+71DoUm29/ACSFat95rwguSpZub+YE2bCR0Q
zzxZIoH4cS+1YdRY4GGY7aldMOGzay7mbBsazvw12V5E8Iea2HzDmfYnEPWE9PlL65
yfYYeLSdFsljQ==
Date: Wed, 22 Sep 2021 16:01:51 +0100 (BST)
From: Peter Stephenson
To: Zsh hackers list
Message-ID: <1639875338.19327.1632322911208@mail2.virginmedia.com>
In-Reply-To:
References:
Subject: Re: "Overlarge EPROG nref" with functions -c
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Priority: 3
Importance: Medium
X-Mailer: Open-Xchange Mailer v7.8.4-Rev72
X-Originating-IP: 165.225.81.118
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfMYW2Lpct+F1MhPEt+UU8FVFasJUkfxGy1DH0AYjJyCYln9A4SoBil29GiUyH5zaI8pFbr71ZuMmihS5nr1PWeHMSIIJOQYlpTedoBNtYQ8fw1NcdK1j
qzhnX7MlJ3gk+3kYMbeWU50nfvK6xCpmSeZYDRimOejFqLK+9XbNFQDn34qGsqR5GVc99NOQP80i87GMdKkzVTbSEdJkHfyJdJXoY4Av4SGFryml0KrXuRfS
X-Seq: 49433
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 22 September 2021 at 15:26 Bart Schaefer wrote:
> On Wed, Sep 22, 2021 at 12:03 AM Mikael Magnusson wrote:
> >
> > parse.c:2816: Overlarge EPROG nref
>
> This means that the number of references to the function exceeds
> MAX_FUNCTION_DEPTH. I presume it checks this because most of the time
> these references come from recursive calls to the function.
Yes, agreed.
The path of least resistance is probably just to remove this debug warning,
which has no further effect and which I don't think we've ever seen in anger.
"functions -c" is supposed to be transparently using the existing reference
mechanism, so adding code for this specific case looks to me more likely to
introduce bugs than help track down bugs we've never seen down.
Unless anyone has smart suggestions...
pws
diff --git a/Src/parse.c b/Src/parse.c
index 10d193ba1..d612b7e17 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -2811,10 +2811,6 @@ freeeprog(Eprog p)
DPUTS(p->nref > 0 && (p->flags & EF_HEAP), "Heap EPROG has nref > 0");
DPUTS(p->nref < 0 && !(p->flags & EF_HEAP), "Real EPROG has nref < 0");
DPUTS(p->nref < -1, "Uninitialised EPROG nref");
-#ifdef MAX_FUNCTION_DEPTH
- DPUTS(zsh_funcnest >=0 && p->nref > zsh_funcnest + 10,
- "Overlarge EPROG nref");
-#endif
if (p->nref > 0 && !--p->nref) {
for (i = p->npats, pp = p->pats; i--; pp++)
freepatprog(*pp);