Skip to content

Commit 51b9000

Browse files
committed
Fix the size of the _Unwind_Exception struct
On OSX 32-bit, the private fields are 5 words long, not 2. I found this segfaulting before this change, and after this change it no longer segfaulted.
1 parent b3003e1 commit 51b9000

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libstd/rt/unwind.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ mod libunwind {
122122

123123
pub type _Unwind_Word = uintptr_t;
124124

125-
#[cfg(not(target_arch = "arm"))]
125+
#[cfg(target_arch = "x86")]
126+
pub static unwinder_private_data_size: int = 5;
127+
128+
#[cfg(target_arch = "x86_64")]
126129
pub static unwinder_private_data_size: int = 2;
127130

128131
#[cfg(target_arch = "arm")]

0 commit comments

Comments
 (0)