summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-12-16 14:32:03 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-12-16 14:32:03 +0000
commita9edf15f9f984749e0bf009266ca844efb670d43 (patch)
treee3acf9f9bb5a19af1fb6f7f8ce9ed7b9fa54dac1 /sys
parent5480869718c42e5e9c7a27eb6ff062204bab26a4 (diff)
Correctly calculate stack increment for MACHINE_STACK_GROWS_UP; fixes problems
where core dumps on hppa were missing the last stack page. ok miod@
Diffstat (limited to 'sys')
-rw-r--r--sys/uvm/uvm_unix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/uvm/uvm_unix.c b/sys/uvm/uvm_unix.c
index 1683515fc1b..649c8b74869 100644
--- a/sys/uvm/uvm_unix.c
+++ b/sys/uvm/uvm_unix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_unix.c,v 1.30 2007/09/15 10:10:37 martin Exp $ */
+/* $OpenBSD: uvm_unix.c,v 1.31 2007/12/16 14:32:02 kettenis Exp $ */
/* $NetBSD: uvm_unix.c,v 1.18 2000/09/13 15:00:25 thorpej Exp $ */
/*
@@ -144,7 +144,7 @@ uvm_grow(p, sp)
* Really need to check vs limit and increment stack size if ok.
*/
#ifdef MACHINE_STACK_GROWS_UP
- si = atop(sp - USRSTACK) - vm->vm_ssize;
+ si = atop(sp - USRSTACK) - vm->vm_ssize + 1;
#else
si = atop(USRSTACK - sp) - vm->vm_ssize;
#endif