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.
This commit is contained in:
Manish Goregaokar 2015-03-01 01:19:12 +05:30
commit 337a0a981e

View File

@ -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