Commit 9044124
gh-156091: Fix crash compiling deeply nested inlined comprehensions
Count inlined-comprehension SETUP_FINALLY handlers toward CO_MAXBLOCKS so
the compiler raises SyntaxError instead of overflowing the except stack.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 59a6913 commit 9044124
4 files changed
Lines changed: 27 additions & 2 deletions
File tree
- Include/internal
- Lib/test
- Misc/NEWS.d/next/Core_and_Builtins
- Python
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3519 | 3519 | | |
3520 | 3520 | | |
3521 | 3521 | | |
| 3522 | + | |
| 3523 | + | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
| 3530 | + | |
| 3531 | + | |
| 3532 | + | |
| 3533 | + | |
| 3534 | + | |
| 3535 | + | |
| 3536 | + | |
3522 | 3537 | | |
3523 | 3538 | | |
3524 | 3539 | | |
| |||
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 | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
| 554 | + | |
554 | 555 | | |
555 | 556 | | |
556 | 557 | | |
| |||
4976 | 4977 | | |
4977 | 4978 | | |
4978 | 4979 | | |
4979 | | - | |
4980 | | - | |
| 4980 | + | |
| 4981 | + | |
| 4982 | + | |
| 4983 | + | |
| 4984 | + | |
4981 | 4985 | | |
4982 | 4986 | | |
4983 | 4987 | | |
| |||
5023 | 5027 | | |
5024 | 5028 | | |
5025 | 5029 | | |
| 5030 | + | |
| 5031 | + | |
5026 | 5032 | | |
5027 | 5033 | | |
5028 | 5034 | | |
| |||
0 commit comments