RFR: JDK-8307331: Correctly update line maps when class redefine rewrites bytecodes

Andrew Dinn adinn at openjdk.org
Thu May 4 09:33:14 UTC 2023


On Thu, 4 May 2023 09:26:33 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

> This small change ensures that repeated bytecode rewrites necessitated by class pool index updates are applied cumulatively when updating the method line number table. The current code applies each change to the original table which means only the last one is applied (and even then with the wrong adjustment).

This fix has been tested manually using the test case linked from the JIRA. An automated test might be possible but is difficult to perform as it would involve hot swapping code and checking line number adjustments via JDWP. Advice from the serviceability team on how to implement such a test would be welcome.

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

PR Comment: https://git.openjdk.org/jdk/pull/13795#issuecomment-1534398012


More information about the hotspot-runtime-dev mailing list