Skip to content
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

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

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

encukou
Copy link
Member

@encukou encukou commented Oct 3, 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)

Fixes: gh-124887

…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 <[email protected]>
@encukou
Copy link
Member Author

encukou commented Oct 3, 2024

I missed this in the big backport. My apologies :(

@encukou encukou added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 3, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @encukou for commit 3e07c20 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 3, 2024
@encukou encukou merged commit b3e2c02 into python:3.12 Oct 4, 2024
93 of 102 checks passed
@encukou encukou deleted the 3.12-static-immortal-skip-assert branch October 4, 2024 14:50
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