mirror of
https://github.com/python/cpython.git
synced 2025-07-27 21:24:32 +00:00
Fix bug #1565514, SystemError not raised on too many nested blocks.
It seems like this should be a different error than SystemError, but I don't have any great ideas and SystemError was raised in 2.4 and earlier. Will backport.
This commit is contained in:
parent
97a57220e8
commit
21997afb0c
3 changed files with 37 additions and 1 deletions
|
@ -3131,8 +3131,11 @@ static int
|
|||
compiler_push_fblock(struct compiler *c, enum fblocktype t, basicblock *b)
|
||||
{
|
||||
struct fblockinfo *f;
|
||||
if (c->u->u_nfblocks >= CO_MAXBLOCKS)
|
||||
if (c->u->u_nfblocks >= CO_MAXBLOCKS) {
|
||||
PyErr_SetString(PyExc_SystemError,
|
||||
"too many statically nested blocks");
|
||||
return 0;
|
||||
}
|
||||
f = &c->u->u_fblock[c->u->u_nfblocks++];
|
||||
f->fb_type = t;
|
||||
f->fb_block = b;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue