[PATCH] D12512: [libcxxabi] Manually align pointers in __cxa_allocate_exception - Fixes PR24604

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 31 18:11:13 PDT 2015


EricWF created this revision.
EricWF added reviewers: mclow.lists, danalbert, compnerd, majnemer.
EricWF added a subscriber: cfe-commits.

In 32 bit builds the __cxa_exception class has an alignment requirement greater than the maximal alignment supported by malloc. If this is the case we need to manually align the pointers returned from malloc in ordered to prevent undefined behavior. This patch does exactly that.

See PR24604 for more information - https://llvm.org/bugs/show_bug.cgi?id=24604

http://reviews.llvm.org/D12512

Files:
  src/cxa_exception.cpp
  test/test_cxa_allocate_exception.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12512.33656.patch
Type: text/x-patch
Size: 5655 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150901/c9da9b75/attachment-0001.bin>


More information about the cfe-commits mailing list