changeset 5086:af32a380118d

. Align top of stack to page size to adjust for OpenBSD's randomized initial stack pointer
author kurt
date Sun, 27 Apr 2014 17:17:20 -0400
parents b3e625cd6b12
children efdc42254e31
files src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	Fri Apr 25 22:05:39 2014 -0700
+++ b/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	Sun Apr 27 17:17:20 2014 -0400
@@ -945,7 +945,7 @@
   if (rslt != 0)
     fatal(err_msg("pthread_stackseg_np failed with err = %d", rslt));
 
-  *bottom = (address)((char *)ss.ss_sp - ss.ss_size);
+  *bottom = (address)(align_size_up((intptr_t)ss.ss_sp, os::vm_page_size()) - ss.ss_size);
   *size   = ss.ss_size;
 #elif defined(_ALLBSD_SOURCE)
   pthread_attr_t attr;