< prev index next >

src/os_cpu/linux_x86/vm/os_linux_x86.cpp

Print this page
rev 12305 : 8169373: Work around linux NPTL stack guard error.
Summary: Also streamline OS guard page handling on linuxs390, linuxppc, aixppc.

@@ -759,10 +759,16 @@
 
      if (pthread_attr_getstack(&attr, (void **)bottom, size) != 0) {
          fatal("Can not locate current stack attributes!");
      }
 
+    // Work around NPTL stack guard error.
+    size_t guard_size = 0;
+    pthread_attr_getguardsize(&attr, &guard_size);
+    *bottom += guard_size;
+    *size   -= guard_size;
+
      pthread_attr_destroy(&attr);
 
   }
   assert(os::current_stack_pointer() >= *bottom &&
          os::current_stack_pointer() < *bottom + *size, "just checking");
< prev index next >