summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compile.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-06-30 14:53:20 (GMT)
committerGitHub <noreply@github.com>2022-06-30 14:53:20 (GMT)
commitf58c366a730ae3e68028dbf63aba7c4033eaec9b (patch)
treec9a04f4a24a9bea722e334243a544d7a76ac7ec8 /Lib/test/test_compile.py
parent48a739ec106dffabe89d67e79736c7dcf2f8f4a6 (diff)
downloadcpython-f58c366a730ae3e68028dbf63aba7c4033eaec9b.zip
cpython-f58c366a730ae3e68028dbf63aba7c4033eaec9b.tar.gz
cpython-f58c366a730ae3e68028dbf63aba7c4033eaec9b.tar.bz2
GH-94329: Don't raise on excessive stack consumption (GH-94421) (GH-94446)
(cherry picked from commit b152bf448b321e3a4c0a7280e0b608840f5ac661)
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 c32c27f..d7c536e 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -1207,6 +1207,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