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

[3.15] gh-159739: Keep generic alias arguments alive while formatting errors (GH-159981) by miss-islington · Pull Request #160020 · python/cpython · GitHub

Repository navigation

[3.15] gh-159739: Keep generic alias arguments alive while formatting errors (GH-159981) - #160020

Merged
JelleZijlstra merged 1 commit into
python:3.15from
miss-islington:backport-9c649db-3.15
Oct 21, 2026
Merged

JelleZijlstra merged 1 commit into
python:3.15from
miss-islington:backport-9c649db-3.15

Conversation

miss-islington commented Oct 21, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

When a generic alias contains a list of parameters and an object claiming to be an unpacked type-variable tuple returns a non-tuple from __typing_subst__, the error path frees the temporary argument tuple before reading it to format a TypeError. That use-after-free can crash the interpreter instead of reporting the invalid substitution.
(cherry picked from commit 9c649db)

Co-authored-by: Jelle Zijlstra jelle@openai.com

…errors (pythonGH-159981)

When a generic alias contains a list of parameters and an object claiming to be an unpacked type-variable tuple returns a non-tuple from `__typing_subst__`, the error path frees the temporary argument tuple before reading it to format a `TypeError`. That use-after-free can crash the interpreter instead of reporting the invalid substitution.
(cherry picked from commit 9c649db)

Co-authored-by: Jelle Zijlstra <jelle@openai.com>
JelleZijlstra merged commit 8411879 into python:3.15 Oct 21, 2026
56 checks passed
miss-islington deleted the backport-9c649db-3.15 branch October 21, 2026 18:50
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL