Skip to content

Commit 5ad81fc

Browse files
committed
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.
2 parents 1456b85 + 28362d5 commit 5ad81fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/sys/unix/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ pub mod guard {
164164

165165
if pthread_main_np() == 1 {
166166
// main thread
167-
current_stack.ss_sp as uint - current_stack.ss_size as uint + 3 * PAGE_SIZE as uint
167+
current_stack.ss_sp as uint - current_stack.ss_size as uint + PAGE_SIZE as uint
168168

169169
} else {
170170
// new thread

0 commit comments

Comments
 (0)