about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-03-01 01:19:12 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-03-01 09:49:46 +0530
commit337a0a981eeb66bbb1c8ac115a60bb91c1b0ca48 (patch)
tree184f0e941bde654c6da0ca7704049414cb25a643 /src/libstd
parent87391ed52ac7fcd00dbb710e3feb2388cc143b58 (diff)
parent28362d542d2561c4cc16cb3229ce3fed7317dbd6 (diff)
downloadrust-337a0a981eeb66bbb1c8ac115a60bb91c1b0ca48.tar.gz
rust-337a0a981eeb66bbb1c8ac115a60bb91c1b0ca48.zip
Rollup merge of #22903 - semarie:openbsd-stack, r=alexcrichton
 some commits in OpenBSD OS have corrected a problem of stack position.
Now, we can adjust more accurately the page guard in rust.

@dhuseby I am not sure that bitrig have already integrated these changes (the `$OpenBSD$` header in sys/kern/kern_exec.c is too old). But when they do, you may want this patch too.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sys/unix/thread.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index f4791d39da1..827e2afdca8 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -164,7 +164,7 @@ pub mod guard {
 
         if pthread_main_np() == 1 {
             // main thread
-            current_stack.ss_sp as uint - current_stack.ss_size as uint + 3 * PAGE_SIZE as uint
+            current_stack.ss_sp as uint - current_stack.ss_size as uint + PAGE_SIZE as uint
 
         } else {
             // new thread