[PATCH] D25417: [libcxxabi] Fix alignment of allocated exceptions in 32 bit builds

2017-03-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 90561. EricWF added a comment. Merge with master https://reviews.llvm.org/D25417 Files: src/cxa_exception.cpp src/fallback_malloc.cpp src/fallback_malloc.h test/test_exception_address_alignment.pass.cpp Index: test/test_exception_address_alignment.p

[PATCH] D25417: [libcxxabi] Fix alignment of allocated exceptions in 32 bit builds

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I ran into some test failures on OS X while attempting to commit this. The `unwind.h` header provided on OS X hasn't upstreamed the libunwind fix from r276215 , meaning `__cxa_exception` is still under-aligned and therefore so is the exc

[PATCH] D25417: [libcxxabi] Fix alignment of allocated exceptions in 32 bit builds

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 80658. EricWF added a comment. - Use `_aligned_malloc` on windows. - Ensure `posix_memalign` isn't called with a size of `0`. I'm 99% sure that's currently impossible but we might as well handle it. I'll commit after testing on OS X. https://reviews.llvm.or

[PATCH] D25417: [libcxxabi] Fix alignment of allocated exceptions in 32 bit builds

2016-12-05 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. I thought we had gotten this merged already. Oops. LGTM with the minor tweak for windows. Comment at: src/fallback_malloc.cpp:206 +return fallback_malloc(size); }

[PATCH] D25417: [libcxxabi] Fix alignment of allocated exceptions in 32 bit builds

2016-10-09 Thread Eric Fiselier via cfe-commits
EricWF created this revision. EricWF added reviewers: mclow.lists, danalbert, jroelofs, compnerd. EricWF added a subscriber: cfe-commits. 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 `p