Commit de58b31
authored
When compiling an AST object with a direct / indirect reference
cycles, on the conversion phase because of exceeding amount of
calls, a segfault was raised. This patch adds recursion guards to
places for preventing user inputs to not to crash AST but instead
raise a RecursionError..
(cherry picked from commit f349124)
Co-authored-by: Batuhan Taskaya <[email protected]>
1 parent 5a8ddcc commit de58b31
File tree
4 files changed
+732
-4
lines changed- Lib/test
- Misc/NEWS.d/next/Core and Builtins
- Parser
- Python
4 files changed
+732
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1027 | 1027 | | |
1028 | 1028 | | |
1029 | 1029 | | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
1030 | 1044 | | |
1031 | 1045 | | |
1032 | 1046 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
394 | 395 | | |
395 | 396 | | |
396 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
397 | 406 | | |
398 | 407 | | |
399 | 408 | | |
| |||
568 | 577 | | |
569 | 578 | | |
570 | 579 | | |
571 | | - | |
572 | | - | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
573 | 583 | | |
574 | 584 | | |
575 | 585 | | |
| |||
582 | 592 | | |
583 | 593 | | |
584 | 594 | | |
585 | | - | |
586 | | - | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
587 | 598 | | |
588 | 599 | | |
589 | 600 | | |
| |||
0 commit comments