RFR: 8240567: MethodTooLargeException thrown while creating a jlink image
Alan Bateman
alanb at openjdk.org
Mon Jun 12 05:06:51 UTC 2023
On Sun, 11 Jun 2023 21:01:54 GMT, Oliver Kopp <duke at openjdk.org> wrote:
> Fix for [JDK-8240567](https://bugs.openjdk.org/browse/JDK-8240567): "MethodTooLargeException thrown while creating a jlink image".
>
> Java still has a 64kb limit: A method may not be longer than 64kb. The idea of the fix is to split up the generated methods in several smaller methods
>
> This is a follow-up to https://github.com/openjdk/jdk/pull/10704. GitHub did not allow me to re-open the PR, because I did a force-push to have one commit.
@koppor Is this ready for review? The other PR went through a dozens or so iterations before it was returned to draft. It seems like you were still battling with verifier errors. The comment on this PR says you it was created because a force-push so I can't tell if you the changes are ready or not.
src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java line 754:
> 752: // Restore all (!) sets from parameter to local variables
> 753: if (nextLocalVar > firstVariableForDedup) {
> 754: // We need to go from the end to the beginning as we will probably overwrite position 2 (which holds the list at the beginning)
Do you mind fixing all the comments as these 160+ lines make it impossible to look at the changes side-by-side again. You had fixed that in the original PR but it looks like they have come back with this PR.
-------------
PR Review: https://git.openjdk.org/jdk/pull/14408#pullrequestreview-1474034803
PR Review Comment: https://git.openjdk.org/jdk/pull/14408#discussion_r1226084193
More information about the core-libs-dev
mailing list