diff src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp @ 8710:9058789475af

7107135: Stack guard pages are no more protected after loading a shared library with executable stack Summary: Detect the execstack attribute of the loaded library and attempt to fix the stack guard using Safepoint op. Reviewed-by: dholmes, zgu Contributed-by: ioi.lam@oracle.com
author iklam
date Tue, 05 Mar 2013 13:55:56 -0800
parents d2f8c38e543d
children 746b070f5022
line wrap: on
line diff
--- a/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp	Tue Mar 05 08:50:59 2013 +0100
+++ b/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp	Tue Mar 05 13:55:56 2013 -0800
@@ -410,6 +410,11 @@
       // to handle_unexpected_exception way down below.
       thread->disable_stack_red_zone();
       tty->print_raw_cr("An irrecoverable stack overflow has occurred.");
+
+      // This is a likely cause, but hard to verify. Let's just print
+      // it as a hint.
+      tty->print_raw_cr("Please check if any of your loaded .so files has "
+                        "enabled executable stack (see man page execstack(8))");
     } else {
       // Accessing stack address below sp may cause SEGV if current
       // thread has MAP_GROWSDOWN stack. This should only happen when