Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

miss-islington
Copy link
Contributor

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

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
35 checks passed
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
Copy link

bedevere-app bot commented Oct 3, 2024

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

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.

2 participants