summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compile.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-06-30 14:27:14 (GMT)
committerGitHub <noreply@github.com>2022-06-30 14:27:14 (GMT)
commitb152bf448b321e3a4c0a7280e0b608840f5ac661 (patch)
treed38cab550cb334b31db7e2bb1860bff62e5e223c /Lib/test/test_compile.py
parent9ef50c1d46dc2a52d83dcc7d0c4f5271344d2f66 (diff)
downloadcpython-b152bf448b321e3a4c0a7280e0b608840f5ac661.zip
cpython-b152bf448b321e3a4c0a7280e0b608840f5ac661.tar.gz
cpython-b152bf448b321e3a4c0a7280e0b608840f5ac661.tar.bz2
GH-94329: Don't raise on excessive stack consumption (GH-94421)
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r--Lib/test/test_compile.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 85b2d82..46b16e7 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -1243,6 +1243,12 @@ class TestExpressionStackSize(unittest.TestCase):
code += " x and x\n" * self.N
self.check_stack_size(code)
+ def test_stack_3050(self):
+ M = 3050
+ code = "x," * M + "=t"
+ # This raised on 3.10.0 to 3.10.5
+ compile(code, "<foo>", "single")
+
class TestStackSizeStability(unittest.TestCase):
# Check that repeating certain snippets doesn't increase the stack size