RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v3]
Alan Bateman
alanb at openjdk.org
Fri Oct 14 16:10:00 UTC 2022
On Fri, 14 Oct 2022 16:02:21 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
>
> Oliver Kopp has updated the pull request incrementally with one additional commit since the last revision:
>
> Reduce number of included ModuleDescriptors
src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java line 705:
> 703: // Here the method is "manually split" based on the heuristics that 99 ModuleDescriptors are smaller than 64kb
> 704: // The other implementation possibility is to use msplit (https://github.com/cretz/msplit). However, this seemed too much effort.
> 705: for (int index = 0; index < moduleInfos.size(); index++) {
This comment will need to be cleaned up a bit to remove the reference to the "msplit" project and changed to be more consistent with the existing comments.
-------------
PR: https://git.openjdk.org/jdk/pull/10704
More information about the core-libs-dev
mailing list