diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-01-11 18:20:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-11 18:20:13 (GMT) |
commit | 782d6fe4434381c50e0c7ec94a1ef9c6debbc333 (patch) | |
tree | 400569ac3175f3e9f40c967da58fafc6df1be5eb /Lib/test/test_compile.py | |
parent | 0a2da50e1867831251fad75377d0f10713eb6301 (diff) | |
download | cpython-782d6fe4434381c50e0c7ec94a1ef9c6debbc333.zip cpython-782d6fe4434381c50e0c7ec94a1ef9c6debbc333.tar.gz cpython-782d6fe4434381c50e0c7ec94a1ef9c6debbc333.tar.bz2 |
bpo-31113: Get rid of recursion in the compiler for normal control flow. (#3015)
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r-- | Lib/test/test_compile.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index 29aa362..4617a12 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -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 |