mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-31113: Get rid of recursion in the compiler for normal control flow. (#3015)
This commit is contained in:
parent
0a2da50e18
commit
782d6fe443
3 changed files with 109 additions and 77 deletions
|
|
@ -671,6 +671,11 @@ if 1:
|
|||
|
||||
compile("42", PathLike("test_compile_pathlike"), "single")
|
||||
|
||||
def test_stack_overflow(self):
|
||||
# bpo-31113: Stack overflow when compile a long sequence of
|
||||
# complex statements.
|
||||
compile("if a: b\n" * 200000, "<dummy>", "exec")
|
||||
|
||||
|
||||
class TestExpressionStackSize(unittest.TestCase):
|
||||
# These tests check that the computed stack size for a code object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue