RFR: 8360219: [AIX] assert(locals_base >= l2) failed: bad placement

Richard Reingruber rrich at openjdk.org
Wed Aug 6 10:58:16 UTC 2025


Weaken assertion because it is too strict. While the interpreted caller sometimes has a `frame::top_ijava_frame_abi` it is sufficient to assert that the locals don't overlap with the smaller `frame::parent_ijava_frame_abi` because only that's reserved for non-top frames (aka `parent` frames).

Tested on AIX and Linux ppc: Tier 1-4 of hotspot and jdk. All of langtools and jaxp. Renaissance Suite and SAP specific tests.

Details:

It cannot be assumed that the interpreted caller of the bottom interpreted frame (from a compiled deoptee frame) has a large `frame::top_ijava_frame_abi`. In an ordinary i2c call it would keep its `frame::top_ijava_frame_abi` (see [`call_from_interpreter`](https://github.com/openjdk/jdk/blob/67ba8b45dd632c40d5e6872d2a6ce24f86c22152/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp#L1217)) but when it was thawed then it'll have only a `frame::java_abi` (alias for parent_ijava_frame_abi).

There are [diagrams](https://github.com/openjdk/jdk/blob/8a571ee7f2d9a46ff485fd9f3658c552e2d20817/src/hotspot/cpu/ppc/continuationFreezeThaw_ppc.inline.hpp#L395) commenting `ThawBase::new_stack_frame()` that show this.

It's not easy to see it in the code though. Note that the [frame size](https://github.com/openjdk/jdk/blob/8a571ee7f2d9a46ff485fd9f3658c552e2d20817/src/hotspot/cpu/ppc/continuationFreezeThaw_ppc.inline.hpp#L496) is calculated relative to hf's unextended_sp which [includes frame::metadata_words](https://github.com/openjdk/jdk/blob/8a571ee7f2d9a46ff485fd9f3658c552e2d20817/src/hotspot/cpu/ppc/stackChunkFrameStream_ppc.inline.hpp#L80) which is the size of `java_abi`.

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

Commit messages:
 - Fix comment
 - Weaken assertion. The bottom frame's caller can have the smaller parent_ijava_frame_abi.

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

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


More information about the hotspot-dev mailing list