mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
7107135: Stack guard pages are no more protected after loading a shared library with executable stack
Detect the execstack attribute of the loaded library and attempt to fix the stack guard using Safepoint op. Reviewed-by: dholmes, zgu
This commit is contained in:
parent
112317dbe3
commit
5116181e1f
13 changed files with 464 additions and 3 deletions
|
@ -410,6 +410,11 @@ inline static bool checkOverflow(sigcontext* uc,
|
|||
// 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue