This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fweimer
Recipients benjamin.peterson, fweimer, gregory.p.smith, methane, nascheme, pitrou, skrah, tgrigg, twouters, vstinner
Date 2019-04-15.11:40:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555328427.94.0.975089754418.issue27987@roundup.psfhosted.org>
In-reply-to
Content
Minor correction: glibc malloc follows ABI on x86-64 and always returns a 16-byte-aligned pointer, independently of allocation size.

However, other mallocs (such as jemalloc and tcmalloc) may return pointers with less alignment for allocation sizes less than 16 bytes, violating ABI.  They still follow ABI for allocations of 16 bytes and more.

But as you said, the distinction should not matter for Python because of the object header.  Furthermore, without LTO, the compiler will not be able to detect that a pointer returned from Py_NewObject is a top-level allocation, and therefore has to be more conservative about alignment, using information from the type definitions only.
History
Date User Action Args
2019-04-15 11:40:27fweimersetrecipients: + fweimer, twouters, nascheme, gregory.p.smith, pitrou, vstinner, benjamin.peterson, methane, skrah, tgrigg
2019-04-15 11:40:27fweimersetmessageid: <1555328427.94.0.975089754418.issue27987@roundup.psfhosted.org>
2019-04-15 11:40:27fweimerlinkissue27987 messages
2019-04-15 11:40:27fweimercreate