cpython icon indicating copy to clipboard operation
cpython copied to clipboard

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

Open encukou opened this issue 1 year ago • 1 comments

Older stable ABI extensions are allowed to make immortal objects mortal. Instead of _Py_IsImmortal, use _PyUnicode_STATE (interned and statically_allocated), or skip asserts altogether.

  • Issue: gh-113993

encukou avatar Jul 04 '24 11:07 encukou

Thanks. I can confirm that it fixes the problem that I've hit with rustworkx and pyproject-fmt-rust.

mgorny avatar Jul 04 '24 12:07 mgorny

:robot: New build scheduled with the buildbot fleet by @encukou for commit 4d92f62c7ddea826aa916081eded4d234621304a :robot:

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

bedevere-bot avatar Jul 16 '24 12:07 bedevere-bot

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

miss-islington-app[bot] avatar Jul 16 '24 13:07 miss-islington-app[bot]

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

bedevere-app[bot] avatar Jul 16 '24 13:07 bedevere-app[bot]