mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +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
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1289,6 +1289,7 @@ class JavaThread: public Thread {
|
|||
void enable_stack_red_zone();
|
||||
void disable_stack_red_zone();
|
||||
|
||||
inline bool stack_guard_zone_unused();
|
||||
inline bool stack_yellow_zone_disabled();
|
||||
inline bool stack_yellow_zone_enabled();
|
||||
|
||||
|
@ -1759,6 +1760,10 @@ inline CompilerThread* JavaThread::as_CompilerThread() {
|
|||
return (CompilerThread*)this;
|
||||
}
|
||||
|
||||
inline bool JavaThread::stack_guard_zone_unused() {
|
||||
return _stack_guard_state == stack_guard_unused;
|
||||
}
|
||||
|
||||
inline bool JavaThread::stack_yellow_zone_disabled() {
|
||||
return _stack_guard_state == stack_guard_yellow_disabled;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue