about summary refs log tree commit diff
path: root/src/libstd/thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/thread.rs')
-rw-r--r--src/libstd/thread.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs
index cfdb5c2ec26..a7b3ee996a3 100644
--- a/src/libstd/thread.rs
+++ b/src/libstd/thread.rs
@@ -232,10 +232,13 @@ impl Builder {
             let my_stack_top = addr as uint;
             let my_stack_bottom = my_stack_top - stack_size + 1024;
             unsafe {
-                stack::record_os_managed_stack_bounds(my_stack_bottom,
-                                                      my_stack_top);
-                thread_info::set(imp::guard::current(), their_thread);
+                stack::record_os_managed_stack_bounds(my_stack_bottom, my_stack_top);
             }
+            thread_info::set(
+                (my_stack_bottom, my_stack_top),
+                unsafe { imp::guard::current() },
+                their_thread
+            );
 
             let mut output = None;
             let f: Thunk<(), T> = if stdout.is_some() || stderr.is_some() {