OpenJDK / jdk / jdk
changeset 54654:7acebe4d65e2
8221639: [i386] expand_exec_shield_cs_limit workaround is undefined code after JDK-8199717
Summary: Only perform this optimization for x86_64
Reviewed-by: dholmes, andrew
author | sgehwolf |
---|---|
date | Thu, 18 Apr 2019 13:58:31 +0200 |
parents | 332f28c3a105 |
children | f7204876ce87 |
files | src/hotspot/os/linux/os_linux.cpp src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/os/linux/os_linux.cpp Tue Apr 30 14:49:19 2019 +0200 +++ b/src/hotspot/os/linux/os_linux.cpp Thu Apr 18 13:58:31 2019 +0200 @@ -5158,13 +5158,16 @@ return JNI_ERR; } +#if defined(IA32) + // Need to ensure we've determined the process's initial stack to + // perform the workaround + Linux::capture_initial_stack(JavaThread::stack_size_at_create()); + workaround_expand_exec_shield_cs_limit(); +#else suppress_primordial_thread_resolution = Arguments::created_by_java_launcher(); if (!suppress_primordial_thread_resolution) { Linux::capture_initial_stack(JavaThread::stack_size_at_create()); } - -#if defined(IA32) - workaround_expand_exec_shield_cs_limit(); #endif Linux::libpthread_init();
--- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp Tue Apr 30 14:49:19 2019 +0200 +++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp Thu Apr 18 13:58:31 2019 +0200 @@ -827,6 +827,7 @@ */ void os::workaround_expand_exec_shield_cs_limit() { #if defined(IA32) + assert(Linux::initial_thread_stack_bottom() != NULL, "sanity"); size_t page_size = os::vm_page_size(); /*