cpython/Parser
Pablo Galindo 4a97b1517a
bpo-41690: Use a loop to collect args in the parser instead of recursion (GH-22053)
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 }] {
        [...] }
2020-09-02 17:44:19 +01:00
..
asdl.py bpo-40528: Improve and clear several aspects of the ASDL definition code for the AST (GH-19952) 2020-05-06 15:29:32 +01:00
asdl_c.py bpo-41204: Fix compiler warning in ast_type_init() (GH-21307) 2020-07-04 23:18:15 +02:00
myreadline.c bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721) 2020-08-04 02:38:16 +02:00
parser.c bpo-41690: Use a loop to collect args in the parser instead of recursion (GH-22053) 2020-09-02 17:44:19 +01:00
peg_api.c bpo-40939: Rename PyPegen* functions to PyParser* (GH-21016) 2020-06-22 00:47:46 +01:00
pegen.c bpo-41690: Use a loop to collect args in the parser instead of recursion (GH-22053) 2020-09-02 17:44:19 +01:00
pegen.h bpo-41690: Use a loop to collect args in the parser instead of recursion (GH-22053) 2020-09-02 17:44:19 +01:00
Python.asdl bpo-40528: Improve and clear several aspects of the ASDL definition code for the AST (GH-19952) 2020-05-06 15:29:32 +01:00
string_parser.c Fix trivial typo in the PEG string parser (GH-21508) 2020-07-16 17:10:23 +01:00
string_parser.h bpo-40939: Remove the old parser (GH-20768) 2020-06-11 17:30:46 +01:00
token.c bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086) 2019-03-07 12:38:08 -08:00
tokenizer.c bpo-36020: Remove snprintf macro in pyerrors.h (GH-20889) 2020-06-15 21:59:47 +02:00
tokenizer.h closes bpo-39721: Fix constness of members of tok_state struct. (GH-18600) 2020-02-27 18:44:52 -08:00