Blame SOURCES/FixPPC64StackOverflow.patch

d557d5
diff -r 0505a797849f src/os/linux/vm/os_linux.cpp
d557d5
--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp	Wed Oct 23 05:23:32 2013 +0100
d557d5
+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	Thu Oct 24 14:21:47 2013 +0000
d557d5
@@ -4538,6 +4538,7 @@
d557d5
   initial_time_count = os::elapsed_counter();
d557d5
   pthread_mutex_init(&dl_mutex, NULL);
d557d5
 
d557d5
+NOT_ZERO (
d557d5
   // If the pagesize of the VM is greater than 8K determine the appropriate
d557d5
   // number of initial guard pages.  The user can change this with the
d557d5
   // command line arguments, if needed.
d557d5
@@ -4546,6 +4547,7 @@
d557d5
     StackRedPages = 1;
d557d5
     StackShadowPages = round_to((StackShadowPages*Linux::vm_default_page_size()), vm_page_size()) / vm_page_size();
d557d5
   }
d557d5
+)
d557d5
 }
d557d5
 
d557d5
 // To install functions for atexit system call
d557d5
@@ -4598,9 +4600,16 @@
d557d5
   // size.  Add a page for compiler2 recursion in main thread.
d557d5
   // Add in 2*BytesPerWord times page size to account for VM stack during
d557d5
   // class initialization depending on 32 or 64 bit VM.
d557d5
+NOT_ZERO (
d557d5
   os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,
d557d5
             (size_t)(StackYellowPages+StackRedPages+StackShadowPages) * Linux::page_size() +
d557d5
                     (2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::vm_default_page_size());
d557d5
+)
d557d5
+ZERO_ONLY (
d557d5
+  os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,           
d557d5
+            (size_t)(StackYellowPages+StackRedPages+StackShadowPages+
d557d5
+                     2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::page_size());
d557d5
+)
d557d5
 
d557d5
   size_t threadStackSizeInBytes = ThreadStackSize * K;
d557d5
   if (threadStackSizeInBytes != 0 &&