mirror of
https://github.com/python/cpython
synced 2024-11-02 14:48:31 +00:00
4a97b1517a
This program can segfault the parser by stack overflow: ``` import ast code = "f(" + ",".join(['a' for _ in range(100000)]) + ")" print("Ready!") ast.parse(code) ``` the reason is that the rule for arguments has a simple recursion when collecting args: args[expr_ty]: [...] | a=named_expression b=[',' c=args { c }] { [...] } |
||
---|---|---|
.. | ||
python.gram | ||
Tokens |