mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-24 05:14:52 +02:00
8183262: noexecstack check in os::dll_load on Linux is too expensive
Convert ElfFile::specifies_noexecstack() to static method which read file header and check executable stack flag. Reviewed-by: iklam, stuefe
This commit is contained in:
parent
907093af23
commit
eb20e62194
4 changed files with 39 additions and 24 deletions
|
@ -1639,8 +1639,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
|||
//
|
||||
// See Linux man page execstack(8) for more info.
|
||||
if (os::uses_stack_guard_pages() && !os::Linux::_stack_is_executable) {
|
||||
ElfFile ef(filename);
|
||||
if (!ef.specifies_noexecstack()) {
|
||||
if (!ElfFile::specifies_noexecstack(filename)) {
|
||||
if (!is_init_completed()) {
|
||||
os::Linux::_stack_is_executable = true;
|
||||
// This is OK - No Java threads have been created yet, and hence no
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue