Skip to content

Commit 28362d5

Browse files
committed
openbsd: adjust page guard address
some commits in OpenBSD base have corrected a problem of stack position. Now, we can adjust more accurately the page guard in rust.
1 parent 8a69110 commit 28362d5

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)