RFR: 8359327: Incorrect AVX3Threshold results into code buffer overflows on APX targets

Sandhya Viswanathan sviswanathan at openjdk.org
Thu Jun 12 21:13:27 UTC 2025


On Thu, 12 Jun 2025 11:49:41 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

> As per the latest architecture-instruction-set-extensions-programming-reference manual version 57[1] , upcoming Diamond Rapids server with APX feature has a different CPU family ID (19) than prior Xeons (6).
> 
> Recently integrated EEVEX to REX2 demotion support with [JDK-8351994](https://bugs.openjdk.org/browse/JDK-8351994) already handles this through a newly defined _VM_Version::is_intel_server_family()_ API, but the existing AVX3Therehold setting is agnostic to this change, which causes code buffer overflows during arraycopy stubs generation.
> 
> Patch fixes this issue and also appropriately increments final code buffer size to prevent buffer overruns during stub generation with non zero AVX3Thereshold. 
> 
> [1] https://www.intel.com/content/www/us/en/content-details/851355/intel-architecture-instruction-set-extensions-programming-reference.html?wapkw=intel%20architecture%20instruction%20set%20extensions%20programming%20reference

Looks good to me.

-------------

Marked as reviewed by sviswanathan (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25780#pullrequestreview-2922666933


More information about the hotspot-compiler-dev mailing list