about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-01-30 20:58:04 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-01-30 21:20:43 -0800
commit51b90004d9670e454dc6e4e841721b052ed0ea25 (patch)
tree4a0c7e2088c83023157247b2929392a14dc52bbf /src/libstd
parentb3003e1e1af8ee5ca74458787f5eb8c565a47e1d (diff)
downloadrust-51b90004d9670e454dc6e4e841721b052ed0ea25.tar.gz
rust-51b90004d9670e454dc6e4e841721b052ed0ea25.zip
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.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/rt/unwind.rs5
1 files changed, 4 insertions, 1 deletions
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")]