[issue27987] obmalloc's 8-byte alignment causes undefined behavior

STINNER Victor report at bugs.python.org
Tue Oct 24 11:33:57 EDT 2017


STINNER Victor <victor.stinner at gmail.com> added the comment:

What matters when a Python object is allocated? The start of the PyObject structure, or the start of the PyGC_Head structure? Would it be possible to align the PyObject start?

The simplest option is to store data which needs to be aligned in a second memory block allocated by PyMem_AlignedAlloc().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27987>
_______________________________________


More information about the Python-bugs-list mailing list