mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +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
2 changed files with 5 additions and 4 deletions
|
@ -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>
|
2021-10-04 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* 49456: Doc/Zsh/mod_private.yo, Doc/Zsh/params.yo,
|
* 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), "Heap EPROG has nref > 0");
|
||||||
DPUTS(p->nref < 0 && !(p->flags & EF_HEAP), "Real EPROG has nref < 0");
|
DPUTS(p->nref < 0 && !(p->flags & EF_HEAP), "Real EPROG has nref < 0");
|
||||||
DPUTS(p->nref < -1, "Uninitialised EPROG nref");
|
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) {
|
if (p->nref > 0 && !--p->nref) {
|
||||||
for (i = p->npats, pp = p->pats; i--; pp++)
|
for (i = p->npats, pp = p->pats; i--; pp++)
|
||||||
freepatprog(*pp);
|
freepatprog(*pp);
|
||||||
|
|
Loading…
Reference in a new issue