HomeFreeBSD

MFC r303157: libcxxrt: add padding in __cxa_allocate_* to fix alignment

Description

MFC r303157: libcxxrt: add padding in __cxa_allocate_* to fix alignment

The addition of the referenceCount to cxa_allocate_exception put the
unwindHeader at offset 0x58 in
cxa_exception, but it requires 16-byte
alignment. In order to avoid changing the current __cxa_exception ABI
(and thus breaking its consumers), add explicit padding in the
allocation routines (and account for it when freeing).

This is intended as a lower-risk change for FreeBSD 11. A "more correct"
fix should be prepared for upstream and -CURRENT.

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

Details

Provenance
emasteAuthored on
Parents
rS303291: MFC r302567:
Branches
Unknown
Tags
Unknown