Author: compnerd Date: Wed Aug 23 08:33:45 2017 New Revision: 311562 URL: http://llvm.org/viewvc/llvm-project?rev=311562&view=rev Log: unwind: explicitly align `_Unwind_Control_Block`
The C++ ABI requires that the exception object is double-word aligned. The alignment attribute was applied to the `_Unwind_Exception` type which is used on non-EHABI targets. On EHABI, the exception object type is `_Unwind_Control_Block`. Apply the explicit maximal alignment on the type to ensure that the allocation has the correct alignment. Resolves PR33858! Modified: libunwind/trunk/include/unwind.h Modified: libunwind/trunk/include/unwind.h URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/include/unwind.h?rev=311562&r1=311561&r2=311562&view=diff ============================================================================== --- libunwind/trunk/include/unwind.h (original) +++ libunwind/trunk/include/unwind.h Wed Aug 23 08:33:45 2017 @@ -100,7 +100,7 @@ struct _Unwind_Control_Block { } pr_cache; long long int :0; /* Enforce the 8-byte alignment */ -}; +} __attribute__((__aligned__)); typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (_Unwind_State state, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits