RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v11]

Mandy Chung mchung at openjdk.org
Fri Dec 13 21:56:41 UTC 2024


On Wed, 11 Dec 2024 02:15:32 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Henry Jen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 13 additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'openjdk/master' into JDK-8321413
>>  - Minor cleanup
>>  - Rename based on feedback to emphasis building a snippet for loading a reference
>>  - Fix typo and comment to match latest implementation
>>  - Fix regression failed to setup helper methods properly
>>  - Separate out ModuleDescriptorBuilder and use LoadableArray for paging
>>  - Merge remote-tracking branch 'openjdk/master' into JDK-8321413
>>  - Loadable support with paging support. The limiting factor is now constant pool size
>>  - Add more comments, move snippet generation code into standalone class
>>  - Fix typo and add comments based on review feedback
>>  - ... and 3 more: https://git.openjdk.org/jdk/compare/712ed4b4...4e82d04e
>
> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java line 337:
> 
>> 335:         byte[] bytes = generator.genClassBytes(cf);
>> 336:         // Diagnosis help, can be removed
>> 337:         if (Boolean.parseBoolean(System.getProperty("JlinkDumpSystemModuleClass", "false"))) {
> 
> jdk.internal.util is exported to jlink, so you can just use `ClassFileDumper` there.

`ClassFileDumper` is not applicable here as it dumps class bytes when it's being defined.  

Suggestion:

        if (Boolean.parseBoolean(System.getProperty("jlink.dumpSystemModuleClass", false))) {

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21022#discussion_r1884583501


More information about the core-libs-dev mailing list