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

Jatin Bhateja jbhateja at openjdk.org
Thu Jun 12 11:55:15 UTC 2025


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

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

Commit messages:
 - 8359327: Incorrect AVX3Threshold results into code buffer overflows on APX targets

Changes: https://git.openjdk.org/jdk/pull/25780/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25780&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8359327
  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/25780.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25780/head:pull/25780

PR: https://git.openjdk.org/jdk/pull/25780


More information about the hotspot-compiler-dev mailing list