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

Dean Long dlong at openjdk.org
Thu Aug 7 02:00:13 UTC 2025


On Tue, 5 Aug 2025 14:53:30 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

> 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`.

It seems like relaxing the assert would allow us to silently overwrite part of a frame::top_ijava_frame_abi, which is only harmless if we are guaranteed to always treat that area as the smaller "parent" ABI past this point.  Is there any way to determine if the ABI frame flavor is "top" or "parent" without adding something like a new "abi_frame_type" slot?

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

PR Comment: https://git.openjdk.org/jdk/pull/26643#issuecomment-3162163970


More information about the hotspot-dev mailing list