Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

This is known issue, but interesting that the cause of the crash is different 
in 3.7-3.8 and 3.9+.

PR 23744 adds recursion checks in the AST validator and optimizer similar to 
the checks in the symtable. It should not break any existing code because too 
deep AST tree did not pass checks in the symtable in any case.

But it does not solve all problems. A compound statement with too many "elif"s 
is still crashed because the new parser uses recursion in C to parse it 
(elif_stmt_rule). I think it should be a separate issue.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42609>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to