mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-04-18 15:54:03 +02:00
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.
This commit is contained in:
parent
fa4c88ca25
commit
0b3b259794
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue