RFR: 8336042: Caller/callee param size mismatch in deoptimization causes crash [v2]

Richard Reingruber rrich at openjdk.org
Fri Feb 14 14:25:12 UTC 2025


On Thu, 13 Feb 2025 21:32:54 GMT, Dean Long <dlong at openjdk.org> wrote:

> > The 2nd assert does not fail w/o the deoptimization.cpp fix. Might be due to alignement of caller->sp() in the interpreter.
> 
> Aarch64 also does alignment, and that's why the test uses two different methods, one with an extra local, to hopefully handle both cases of even/odd 2-word (16 byte) alignment. But ppc might be different enough that this isn't enough to trigger the bug. Or maybe the end of frame bound is slightly off?

I think you can make the assertion a little stricter like this https://github.com/reinrich/jdk/commit/9c3c8a33a29b9ae6c4c703992b306dc0cbbcd2f0.
The test still doesn't fail on ppc64 w/o the fix. This is because the deoptee's caller is alwys enlarged [here](https://github.com/openjdk/jdk/blob/57f4c30fb6be1da57c8fcc742b5c36d842eef397/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp#L2840) although it's only necessary if it is the entry frame or compiled.

(Reasoning for the stricter assertion: interpreter frames on top of stack have a `frame::top_ijava_frame_abi` just above sp needed for VM calls. When a call is received by the interpreter, it trimms the abi of the caller back to `frame::parent_ijava_frame_abi`. An i2c adapter does not do this.)

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

PR Comment: https://git.openjdk.org/jdk/pull/23557#issuecomment-2659465735


More information about the hotspot-dev mailing list