Fix incorrectly aligned exceptions in 32 bit builds.
This patch fixes a bug where exceptions in 32 bit builds would be incorrectly aligned because malloc only provides 8 byte aligned memory where 16 byte alignment is needed. This patch makes libc++abi correctly use posix_memalign when it's available. This requires defining _LIBCPP_BUILDING_LIBRARY so that libc++ only defines _LIBCPP_HAS_NO_ALIGNED_ALLOCATION when libc doesn't support it and not when aligned new/delete are disable for other reasons. This bug somehow made it into the 7.0 release, making it a regression. Therefore this patch should be included in the next dot release. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@342815 91177308-0d34-0410-b5e6-96231b3b80d8
Loading
Please sign in to comment