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.7: gh-113993 backported without subsequent fixes, causing python3: Objects/unicodeobject.c:15018: intern_common: Assertion _Py_IsImmortal(r)' failed.` #124887

Closed
mgorny opened this issue Oct 2, 2024 · 4 comments
Assignees
Labels
3.12 bugs and security fixes topic-C-API type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@mgorny
Copy link
Contributor

mgorny commented Oct 2, 2024

Crash report

What happened?

The 49f6beb ("Make interned strings mortal") backport introduced ABI-breaking assertions into 3.12.7. As a result, Rust stable ABI packages are now crashing on assertions, e.g. from uv's cargo test:

          5 │+python3: Objects/unicodeobject.c:15018: intern_common: Assertion `_Py_IsImmortal(r)' failed.
          6 │+python3: Objects/unicodeobject.c:15018: intern_common: Assertion `_Py_IsImmortal(r)' failed.

Backporting 281ffb6 seems to fix the immediate issue but I haven't checked for more regressions.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

Python 3.12.7 (main, Oct 1 2024, 21:49:30) [GCC 14.2.1 20240921]

@mgorny mgorny added the type-crash A hard crash of the interpreter, possibly with a core dump label Oct 2, 2024
@ZeroIntensity ZeroIntensity added topic-C-API 3.12 bugs and security fixes labels Oct 2, 2024
@ZeroIntensity
Copy link
Member

Ah, this problem again. assert(_Py_IsImmortal(...)) breaks stable ABI extensions -- we're supposed to use assert(_Py_IsImmortalLoose(...)). IIRC, that PR took a while to backport, so there's a chance that it predated _Py_IsImmortalLoose. cc @encukou

@encukou
Copy link
Member

encukou commented Oct 3, 2024

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

@encukou
Copy link
Member

encukou commented Oct 4, 2024

I've merged the backport: #124938

@encukou encukou closed this as completed Oct 4, 2024
@mgorny
Copy link
Contributor Author

mgorny commented Oct 4, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes topic-C-API type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

3 participants