mirror of
https://github.com/python/cpython.git
synced 2025-08-09 19:38:42 +00:00
[3.12] gh-108179: Add error message for parser stack overflows (GH-108256) (#108263)
gh-108179: Add error message for parser stack overflows (GH-108256)
(cherry picked from commit 86617518c4
)
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
This commit is contained in:
parent
ef4d427fd8
commit
149d70c254
5 changed files with 542 additions and 1063 deletions
|
@ -2335,7 +2335,7 @@ while 1:
|
|||
source = "-" * 100000 + "4"
|
||||
for mode in ["exec", "eval", "single"]:
|
||||
with self.subTest(mode=mode):
|
||||
with self.assertRaises(MemoryError):
|
||||
with self.assertRaisesRegex(MemoryError, r"too complex"):
|
||||
compile(source, "<string>", mode)
|
||||
|
||||
@support.cpython_only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue