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

Tom Rodriguez never at openjdk.org
Tue Feb 25 02:03:57 UTC 2025


On Mon, 24 Feb 2025 22:34:01 GMT, Dean Long <dlong at openjdk.org> wrote:

>> src/hotspot/share/runtime/deoptimization.cpp line 650:
>> 
>>> 648:       // would need to get the size from the resolved method entry.  Another exception would
>>> 649:       // be an invokedynamic with an adapter that is really a MethodHandle linker.
>>> 650:       caller_was_method_handle = true;
>> 
>> This flag also controls the code at 711 that controls the computation of caller_adjustment.  Is the new answer also correct for that code?
>> 
>> This code might be a bit clearer if the computations of  caller_was_method_handle, caller_adjustment and the new caller_actual_parameters were all closer together, though that might complicate a backport so maybe it should be deferred to some later cleanup.
>
> Yes, I have further cleanup that I want to do later, but I want to minimize changes in this one to simplify backports.
> Good catch about line 711.  I left it in on purpose, again to simplify backports, but it could be safely removed.  All it does here is over-estimate the adjustment, which is harmless.  In future cleanups, I hope to make the adjustment exact rather than a possibly over-estimated increment.

Sounds good.  I kind of assumed it was a benign oversizing.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23557#discussion_r1968699203


More information about the hotspot-dev mailing list