RFR: 8312495: assert(0 <= i && i < _len) failed: illegal index after JDK-8287061 on big endian platforms [v2]

Richard Reingruber rrich at openjdk.org
Mon Jul 24 14:54:57 UTC 2023


> On big endian platforms `jint` values are stored in the high part of `StackValue` values. Therefore the the `StackValue` cannot be cast directly to `jint`. More details why this has to be like this are given in the JBS issue.
> 
> This is a common pattern. See also
> 
> https://github.com/openjdk/jdk/blob/8d29329138d44800ee4c0c02dacc01a06097de66/src/hotspot/share/runtime/deoptimization.cpp#L1386-L1387
> https://github.com/openjdk/jdk/blob/8d29329138d44800ee4c0c02dacc01a06097de66/src/hotspot/share/runtime/deoptimization.cpp#L1513-L1514
> 
> ### Testing
> Manny iterations of vmTestbase/vm/mlvm/meth/stress/compiler/sequences/Test.java.
> 
> JTReg tests: tier1-4 of hotspot and jdk. All of Langtools and jaxp. Renaissance benchmarks as functional tests.
> 
> All testing was done with fastdebug and release builds on the main platforms and also on Linux/PPC64le.

Richard Reingruber has updated the pull request incrementally with one additional commit since the last revision:

  Encapsulate endianess dependencies in StackValue::get_jint and set_jint

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14976/files
  - new: https://git.openjdk.org/jdk/pull/14976/files/224a65f7..9be56893

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14976&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14976&range=00-01

  Stats: 90 lines in 7 files changed: 14 ins; 21 del; 55 mod
  Patch: https://git.openjdk.org/jdk/pull/14976.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14976/head:pull/14976

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


More information about the hotspot-compiler-dev mailing list