From 0b3b25979478ed8af7b337b9ed6739fd69dfeee8 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 5 Oct 2021 16:45:55 +0100 Subject: 49433: Don't assume EPROG references are bounded by function depth. We use references for efficient function copy, so there is no useful limit any more. --- ChangeLog | 5 +++++ Src/parse.c | 4 ---- 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 + + * 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 * 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); -- cgit 1.4.1