Antoine Pitrou <pit...@free.fr> added the comment: >From the linked changeset message:
> unless anyone knows of a platform where ssize_t is 4 bytes? That's most 32-bit platforms, right? Basically, size_t and ssize_t are pointer-sized except on some rare architectures. > A more correct non-hacky alternative if any alignment issues are still found > would be to use a compiler specific alignment declaration on the structure > and determine which value to use at configure time. AFAIU, the problem is not alignment of the PyGC_Head structure (it's always sufficiently aligned for its pointer-sized members) but alignment of the user-defined object that follows it. The underlying issue IMO is we're trying to force a one-size-fits-all alignment for user-defined object structs that we know nothing about (but might contain something like a "long double" or, worse, some SIMD values). Perhaps PyTypeObject should grow a `tp_alignment` field. ---------- nosy: +gregory.p.smith, serhiy.storchaka, tim.peters _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33589> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com