This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Commit c56e8e0
committed
Fix issue 16856: Apply correct alignment on the Unwind_Exception structure
In libundwind, _Unwind_Exception structure is defined as follows:
```
struct _Unwind_Exception
{
uint64_t exception_class;
_Unwind_Exception_Cleanup_Fn exception_cleanup;
unsigned long private_1;
unsigned long private_2;
} __attribute__((__aligned__));
```
so the alignment is done on the entire structure, and it
depends on the architecture. This sets the structure
to be 16bit aligned on the X86_64, so the binary layout
matches and that the C++ compiler's optimizations are still
valid (for example, on FreeBSD-12, exception handling was broken
because libunwind assumes correct alignment, so the fast but fragile
instructions were used.1 parent eb58dcb commit c56e8e0
1 file changed
+18
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
57 | 70 | | |
58 | 71 | | |
59 | 72 | | |
| |||
0 commit comments