-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Closed
Labels
3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Running a simple piece of code:
eval("(" * 200 + ")" * 200)
raised an error like this in Python 3.8:
>>> eval("(" * 200 + ")" * 200)
s_push: parser stack overflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError
It was then fixed in Python 3.9 (by the new parser, I guess) and it's now back – since 3.14 alpha 6 the error for the same code is:
>>> eval("(" * 200 + ")" * 200)
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
eval("(" * 200 + ")" * 200)
~~~~^^^^^^^^^^^^^^^^^^^^^^^
MemoryError: Parser stack overflowed - Python source too complex to parse
I did a bisection and found commit 0142236 by @markshannon, after which we see the same error. as before
CPython versions tested on:
3.14
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error