summaryrefslogtreecommitdiff
path: root/src/fallback_malloc.h
AgeCommit message (Collapse)Author
2017-03-04[libcxxabi] Fix alignment of allocated exceptions in 32 bit buildsEric Fiselier
Summary: In 32 bit builds on a 64 bit system `std::malloc` does not return correctly aligned memory. This leads to undefined behavior. This patch switches to using `posix_memalign` to allocate correctly aligned memory instead. Reviewers: mclow.lists, danalbert, jroelofs, compnerd Reviewed By: compnerd Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25417 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296952 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01[libc++abi] Clean up visibilityShoaib Meenai
Use the libc++abi visibility macros instead of pragmas or using visibility attributes directly. Clean up redundant attributes on definitions (where the declarations already have visibility attributes applied, from either libc++ or libc++abi headers). Introduce _LIBCXXABI_WEAK as a drive-by cleanup, which matches the semantics of _LIBCPP_WEAK. No functional change. Tested by building on Linux before and after this change and verifying that the list of exported symbols is identical. Differential Revision: https://reviews.llvm.org/D26949 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296576 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-07Recommit r282692: [libc++abi] Use fallback_malloc to allocate ↵Igor Kudrin
__cxa_eh_globals in case of dynamic memory exhaustion. Throwing an exception for the first time may lead to call calloc to allocate memory for __cxa_eh_globals. If the memory pool is exhausted at that moment, it results in abnormal termination of the program. This patch addresses the issue by using fallback_malloc in that case. In this revision, some restrictions were added into the test to not run it in unsuitable environments. Differential Revision: https://reviews.llvm.org/D17815 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@283531 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29Revert r282692: Use fallback_malloc to allocate __cxa_eh_globals in case of ↵Igor Kudrin
dynamic memory exhaustion. The test breaks build bots. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@282703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29[libc++abi] Use fallback_malloc to allocate __cxa_eh_globals in case of ↵Igor Kudrin
dynamic memory exhaustion. Throwing an exception for the first time may lead to call calloc to allocate memory for __cxa_eh_globals. If the memory pool is exhausted at that moment, it results in abnormal termination of the program. This patch addresses the issue by using fallback_malloc in that case. Differential Revision: https://reviews.llvm.org/D17815 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@282692 91177308-0d34-0410-b5e6-96231b3b80d8