FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-156091: Fix crash compiling deeply nested inlined comprehensions by iritkatriel · Pull Request #156957 · python/cpython · GitHub

Repository navigation

gh-156091: Fix crash compiling deeply nested inlined comprehensions - #156957

Merged
iritkatriel merged 2 commits into
python:mainfrom
iritkatriel:gh-156091
Sep 5, 2026
Merged

iritkatriel merged 2 commits into
python:mainfrom
iritkatriel:gh-156091

Conversation

iritkatriel commented Sep 4, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Count inlined-comprehension SETUP_FINALLY handlers toward CO_MAXBLOCKS so the compiler raises SyntaxError instead of overflowing the except stack.

Fixes #156091.

…ions

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>
iritkatriel added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes type-crash A hard crash of the interpreter, possibly with a core dump and removed awaiting core review labels Sep 4, 2026
iritkatriel enabled auto-merge (squash) September 5, 2026 15:30
iritkatriel merged commit 14a93f4 into python:main Sep 5, 2026
54 checks passed

Copy link
Copy Markdown

Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

bedevere-app Bot commented Sep 5, 2026

Copy link
Copy Markdown

GH-156992 is a backport of this pull request to the 3.15 branch.

bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Sep 5, 2026

Copy link
Copy Markdown

Sorry, @iritkatriel, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 14a93f4d91edf767e7b35413127cfcd6a2806983 3.13

bedevere-app Bot commented Sep 5, 2026

Copy link
Copy Markdown

GH-156993 is a backport of this pull request to the 3.14 branch.

bedevere-app Bot commented Sep 6, 2026

Copy link
Copy Markdown

GH-157050 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 only security fixes label Sep 6, 2026
clin1234 pushed a commit to clin1234/cpython that referenced this pull request Sep 12, 2026
iritkatriel added a commit that referenced this pull request Sep 17, 2026
…sions (GH-156957) (#157050)

Count inlined-comprehension SETUP_FINALLY handlers toward CO_MAXBLOCKS.
Manual backport of 14a93f4 / GH-156993; 3.13 still has this code in compile.c.

Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-crash A hard crash of the interpreter, possibly with a core dump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiler crash: inlined comprehensions overflow _PyCfgExceptStack, bypassing the u_nfblocks block-nesting limit

2 participants


Back | FazBrowse Home | New Git URL