Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit c7182eb

Browse files
authored
Merge pull request #1823 from Burgos/exception_alignment
Fix issue 16856: Apply correct alignment on the Unwind_Exception stru… merged-on-behalf-of: Jonathan M Davis <jmdavis@users.noreply.github.com>
2 parents ed4e437 + c56e8e0 commit c7182eb

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

src/rt/unwind.d

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,25 @@ alias _Unwind_Exception_Cleanup_Fn = void function(
4848
_Unwind_Reason_Code reason,
4949
_Unwind_Exception *exc);
5050

51-
struct _Unwind_Exception
51+
version (X86_64)
5252
{
53-
align(8) _Unwind_Exception_Class exception_class;
54-
_Unwind_Exception_Cleanup_Fn exception_cleanup;
55-
_Unwind_Word private_1;
56-
_Unwind_Word private_2;
53+
align(16) struct _Unwind_Exception
54+
{
55+
_Unwind_Exception_Class exception_class;
56+
_Unwind_Exception_Cleanup_Fn exception_cleanup;
57+
_Unwind_Word private_1;
58+
_Unwind_Word private_2;
59+
}
60+
}
61+
else
62+
{
63+
align(8) struct _Unwind_Exception
64+
{
65+
_Unwind_Exception_Class exception_class;
66+
_Unwind_Exception_Cleanup_Fn exception_cleanup;
67+
_Unwind_Word private_1;
68+
_Unwind_Word private_2;
69+
}
5770
}
5871

5972
struct _Unwind_Context;

0 commit comments

Comments
 (0)