Skip to content

Commit

Permalink
gh-94445: add compiler test for another case of excessive stack use (G…
Browse files Browse the repository at this point in the history
…H-99237)

(cherry picked from commit 027bc7e)

Co-authored-by: Carl Meyer <[email protected]>
  • Loading branch information
miss-islington and carljm authored Nov 8, 2022
1 parent 00147a8 commit 1565db7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Lib/test/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,13 @@ def test_stack_3050(self):
# This raised on 3.10.0 to 3.10.5
compile(code, "<foo>", "single")

def test_stack_3050_2(self):
M = 3050
args = ", ".join(f"arg{i}:type{i}" for i in range(M))
code = f"def f({args}):\n pass"
# 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
Expand Down

0 comments on commit 1565db7

Please sign in to comment.