From e7f63ba3109adf614cee1bc392cfeef85e9ca778 Mon Sep 17 00:00:00 2001 From: Jatin Bhateja Date: Fri, 13 Jun 2025 09:01:09 +0000 Subject: [PATCH] 8359327: Incorrect AVX3Threshold results into code buffer overflows on APX targets Reviewed-by: sviswanathan --- src/hotspot/cpu/x86/stubDeclarations_x86.hpp | 2 +- src/hotspot/cpu/x86/vm_version_x86.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/cpu/x86/stubDeclarations_x86.hpp b/src/hotspot/cpu/x86/stubDeclarations_x86.hpp index dcb919ddcd0..2ca05bc773e 100644 --- a/src/hotspot/cpu/x86/stubDeclarations_x86.hpp +++ b/src/hotspot/cpu/x86/stubDeclarations_x86.hpp @@ -239,7 +239,7 @@ do_arch_blob, \ do_arch_entry, \ do_arch_entry_init) \ - do_arch_blob(final, 31000 \ + do_arch_blob(final, 33000 \ WINDOWS_ONLY(+22000) ZGC_ONLY(+20000)) \ #endif // CPU_X86_STUBDECLARATIONS_HPP diff --git a/src/hotspot/cpu/x86/vm_version_x86.cpp b/src/hotspot/cpu/x86/vm_version_x86.cpp index 152866e65f3..e4a101a5977 100644 --- a/src/hotspot/cpu/x86/vm_version_x86.cpp +++ b/src/hotspot/cpu/x86/vm_version_x86.cpp @@ -2111,7 +2111,7 @@ bool VM_Version::is_intel_cascade_lake() { // has improved implementation of 64-byte load/stores and so the default // threshold is set to 0 for these platforms. int VM_Version::avx3_threshold() { - return (is_intel_family_core() && + return (is_intel_server_family() && supports_serialize() && FLAG_IS_DEFAULT(AVX3Threshold)) ? 0 : AVX3Threshold; }