[issue27987] obmalloc's 8-byte alignment causes undefined behavior
Antoine Pitrou
report at bugs.python.org
Sat May 25 13:40:17 EDT 2019
Antoine Pitrou <pitrou at free.fr> added the comment:
Here is what I've found for (32-bit) ARM:
- "long double" is 8 bytes long, so it's probably the same as "double"
(see http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0274b/index.html)
- the standard alignment for "double" is 8 bytes
(see http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf)
And on (32-bit) x86, it looks like the standard alignment for "long double" is 4 bytes:
https://www.codesynthesis.com/~boris/blog/2009/04/06/cxx-data-alignment-portability/
So I don't think there's anything to change on 32-bit Python builds *if* we only really care about ARM and x86 (which is restrictive, but using "long double" in C extension types is a bit of an exotic issue).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27987>
_______________________________________
More information about the Python-bugs-list
mailing list