about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/parse.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 62470ba0b..d1ca22d26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-10-05  Peter Stephenson  <p.stephenson@samsung.com>
+
+	* 49433: Src/parse.c: Assuming EPROG references are bounded by
+	function depth is incorrect as we have efficient function copy.
+
 2021-10-04  Bart Schaefer  <schaefer@zsh.org>
 
 	* 49456: Doc/Zsh/mod_private.yo, Doc/Zsh/params.yo,
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);