You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading the Debian reports, it seems like the plan is for m86k to switch to 4-byte alignment anyway. Do we need to fix this?
@ZeroIntensity, there is no alternative ABI for Linux/m68k. That's why Debian picked up this patch.
No kernel and toolchain patches have been posted that would constitute a new ABI and no effort has been made to design a new ABI to meet the needs of everyone in the Linux/m68k community for the foreseeable future.
Distro maintainers are primarily concerned with their own software and its users, which is understandable.
Regardless, I think the patch stands on its merits because, IMO, the patch improves the python source code by improving correctness, readability, portability and reusability.
It shouldn't, the headers are compatible with C++. _Py_ALIGN_AS is designed to be okay anywhere it's needed, but we'll find out very quickly indeed if it isn't sufficient once it appears in PyObject.
If we want to introduce _Py_ALIGN_AS in the regular builds, this looks like the perfect issue to do it.
It is exactly the use case for _Py_ALIGN_AS.
If there are any issues with PyObject, we'll know quickly. If it turns out that we do need to revert, we “only” lose compatibility with an unsupported platform -- we'd be back to the drawing board on this issue.
I'd hold the 3.13 backport though; and maybe even 3.14 just to be safe.
People building for m68k can backport the patch downstream; in GCC-only land there shouldn't be much to worry about.
I think we should definitely get sign-off from the C API WG before requiring _Py_ALIGN_AS to build the core
The sign-off is done. Judging by the vote, the WG prefers_Py_ALIGN_AS being in both builds. It just wasn't needed, and thus tested, in the regular one yet.
We also don't test this [...] this is an unsupported platform.
Read “unsupported” more as “not in our CI” and less as “we won't spend time on this”.
We wouldn't magically add support for m68k with the patch; it's still on Gentoo/m68k & other maintainers to build, test, and report issues/PRs that we might merge.
The important thing for us is that supported platforms don't break.
Thank you for supporting Python on platforms we can't test here!
Now merged in main.
Generally, we don't backport fixes for unsupported architectures -- that would implicitly promise some support, and we can't test on m64k. Please patch locally for Debian & Gentoo. Does that sound fair?
Python 3.14 & below shouldn't change much any more, but if things break, we can help.
For GCC (and presumably clang), I'd recommend going with @fthain's simpler patch (using Py_ALIGNED(1 << _PyObject_ALIGNMENT_SHIFT)).
Now merged in main. Generally, we don't backport fixes for unsupported architectures -- that would implicitly promise some support, and we can't test on m64k. Please patch locally for Debian & Gentoo. Does that sound fair? Python 3.14 & below shouldn't change much any more, but if things break, we can help.
For GCC (and presumably clang), I'd recommend going with @fthain's simpler patch (using Py_ALIGNED(1 << _PyObject_ALIGNMENT_SHIFT)).
Thanks for your help in fixing this, @encukou.
For Debian, Gentoo, buildroot et al. I have now backported this fix on the gc_crash-3.13 branch. The gc_crash branch is suitable for python 3.14.
Activity
fthain commentedon Jun 1, 2025
Debian has a bug report for this issue.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1105110
AA-Turner commentedon Jun 2, 2025
Note m86k is not a supported platform per PEP 11.
ZeroIntensity commentedon Jun 3, 2025
Reading the Debian reports, it seems like the plan is for m86k to switch to 4-byte alignment anyway. Do we need to fix this?
fthain commentedon Jun 4, 2025
@ZeroIntensity, there is no alternative ABI for Linux/m68k. That's why Debian picked up this patch.
No kernel and toolchain patches have been posted that would constitute a new ABI and no effort has been made to design a new ABI to meet the needs of everyone in the Linux/m68k community for the foreseeable future.
Distro maintainers are primarily concerned with their own software and its users, which is understandable.
Regardless, I think the patch stands on its merits because, IMO, the patch improves the python source code by improving correctness, readability, portability and reusability.
6 remaining items
zooba commentedon Jun 4, 2025
It shouldn't, the headers are compatible with C++.
_Py_ALIGN_ASis designed to be okay anywhere it's needed, but we'll find out very quickly indeed if it isn't sufficient once it appears inPyObject.@encukou Thoughts here?
encukou commentedon Jun 4, 2025
If we want to introduce
_Py_ALIGN_ASin the regular builds, this looks like the perfect issue to do it.It is exactly the use case for
_Py_ALIGN_AS.If there are any issues with
PyObject, we'll know quickly. If it turns out that we do need to revert, we “only” lose compatibility with an unsupported platform -- we'd be back to the drawing board on this issue.I'd hold the 3.13 backport though; and maybe even 3.14 just to be safe.
People building for
m68kcan backport the patch downstream; in GCC-only land there shouldn't be much to worry about.The sign-off is done. Judging by the vote, the WG prefers
_Py_ALIGN_ASbeing in both builds. It just wasn't needed, and thus tested, in the regular one yet.Read “unsupported” more as “not in our CI” and less as “we won't spend time on this”.
We wouldn't magically add support for
m68kwith the patch; it's still on Gentoo/m68k & other maintainers to build, test, and report issues/PRs that we might merge.The important thing for us is that supported platforms don't break.
Thank you for supporting Python on platforms we can't test here!
gh-127545: Add _Py_ALIGNED_DEF(N, T) and use it for PyObject (GH-135209)
encukou commentedon Jun 11, 2025
Now merged in
main.Generally, we don't backport fixes for unsupported architectures -- that would implicitly promise some support, and we can't test on m64k. Please patch locally for Debian & Gentoo. Does that sound fair?
Python 3.14 & below shouldn't change much any more, but if things break, we can help.
For GCC (and presumably clang), I'd recommend going with @fthain's simpler patch (using
Py_ALIGNED(1 << _PyObject_ALIGNMENT_SHIFT)).fthain commentedon Jun 12, 2025
Thanks for your help in fixing this, @encukou.
For Debian, Gentoo, buildroot et al. I have now backported this fix on the gc_crash-3.13 branch. The gc_crash branch is suitable for python 3.14.
thesamesam commentedon Jun 12, 2025
Thanks all. @fthain can you file a bug on the Gentoo side for backporting please?
pythongh-127545: Add _Py_ALIGNED_DEF(N, T) and use it for PyObject (p…
pythongh-127545: Add _Py_ALIGNED_DEF(N, T) and use it for PyObject (p…
pythongh-127545: Add _Py_ALIGNED_DEF(N, T) and use it for PyObject (p…
pythongh-127545: Add _Py_ALIGNED_DEF(N, T) and use it for PyObject (p…