From 51b90004d9670e454dc6e4e841721b052ed0ea25 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 30 Jan 2014 20:58:04 -0800 Subject: [PATCH] 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. --- src/libstd/rt/unwind.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs index 88c6b52ec23..16126ea1447 100644 --- a/src/libstd/rt/unwind.rs +++ b/src/libstd/rt/unwind.rs @@ -122,7 +122,10 @@ mod libunwind { pub type _Unwind_Word = uintptr_t; - #[cfg(not(target_arch = "arm"))] + #[cfg(target_arch = "x86")] + pub static unwinder_private_data_size: int = 5; + + #[cfg(target_arch = "x86_64")] pub static unwinder_private_data_size: int = 2; #[cfg(target_arch = "arm")]