mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
GH-94329: Don't raise on excessive stack consumption (GH-94421) (GH-94446)
(cherry picked from commit b152bf448b
)
This commit is contained in:
parent
48a739ec10
commit
f58c366a73
3 changed files with 9 additions and 6 deletions
|
@ -8391,12 +8391,7 @@ assemble(struct compiler *c, int addNone)
|
|||
if (maxdepth < 0) {
|
||||
goto error;
|
||||
}
|
||||
if (maxdepth > MAX_ALLOWED_STACK_USE) {
|
||||
PyErr_Format(PyExc_SystemError,
|
||||
"excessive stack use: stack is %d deep",
|
||||
maxdepth);
|
||||
goto error;
|
||||
}
|
||||
/* TO DO -- For 3.12, make sure that `maxdepth <= MAX_ALLOWED_STACK_USE` */
|
||||
|
||||
if (label_exception_targets(entryblock)) {
|
||||
goto error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue