r311563 - Headers: give _Unwind_Control_Block double-word alignment

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 23 08:43:52 PDT 2017


Hans,

Can we get this merged to the 5.0 branch as well?  This corresponds to the
libunwind fix for the alignment of the exception type.

Thanks!

On Wed, Aug 23, 2017 at 8:36 AM Saleem Abdulrasool via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: compnerd
> Date: Wed Aug 23 08:35:33 2017
> New Revision: 311563
>
> URL: http://llvm.org/viewvc/llvm-project?rev=311563&view=rev
> Log:
> Headers: give _Unwind_Control_Block double-word alignment
>
> The C++ ABI requires that the exception object (which under AEABI is the
> `_Unwind_Control_Block`) is double-word aligned.  The attribute was
> applied to the `_Unwind_Exception` type, but not the
> `_Unwind_Control_Block`.  This should fix the libunwind test for the
> alignment of the exception type.
>
> Modified:
>     cfe/trunk/lib/Headers/unwind.h
>
> Modified: cfe/trunk/lib/Headers/unwind.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/unwind.h?rev=311563&r1=311562&r2=311563&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Headers/unwind.h (original)
> +++ cfe/trunk/lib/Headers/unwind.h Wed Aug 23 08:35:33 2017
> @@ -149,7 +149,7 @@ struct _Unwind_Control_Block {
>      uint32_t reserved1;
>    } pr_cache;
>    long long int : 0; /* force alignment of next item to 8-byte boundary */
> -};
> +} __attribute__((__aligned__));
>  #else
>  struct _Unwind_Exception {
>    _Unwind_Exception_Class exception_class;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170823/1be06034/attachment.html>


More information about the cfe-commits mailing list