Skip to content

[3.13] gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (GH-121358) - #121851

Merged
encukou merged 1 commit into
python:3.13from
miss-islington:backport-956270d-3.13
Jul 16, 2024
Merged

encukou merged 1 commit into
python:3.13from
miss-islington:backport-956270d-3.13

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 16, 2024 •

Copy link
Copy Markdown
Contributor

Older stable ABI extensions are allowed to make immortal objects mortal.
Instead, use _PyUnicode_STATE (interned and statically_allocated).
(cherry picked from commit 956270d)

Co-authored-by: Petr Viktorin encukou@gmail.com

…_IsImmortal (pythonGH-121358)

Older stable ABI extensions are allowed to make immortal objects mortal.
Instead, use `_PyUnicode_STATE` (`interned` and `statically_allocated`).
(cherry picked from commit 956270d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@encukou
encukou enabled auto-merge (squash) July 16, 2024 13:37
@encukou
encukou merged commit 281ffb6 into python:3.13 Jul 16, 2024
encukou added a commit to encukou/cpython that referenced this pull request Oct 3, 2024
…rt) _Py_IsImmortal (pythonGH-121358) (pythonGH-121851)

pythongh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (pythonGH-121358)

Older stable ABI extensions are allowed to make immortal objects mortal.
Instead, use `_PyUnicode_STATE` (`interned` and `statically_allocated`).
(cherry picked from commit 956270d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@bedevere-app

bedevere-app Bot commented Oct 3, 2024

Copy link
Copy Markdown

GH-124938 is a backport of this pull request to the 3.12 branch.

@miss-islington
miss-islington deleted the backport-956270d-3.13 branch January 2, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants