RFR: 8240567: MethodTooLargeException thrown while creating a jlink image

Oliver Kopp duke at openjdk.org
Thu Oct 20 20:30:47 UTC 2022


On Sun, 16 Oct 2022 16:22:44 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> I think there are still issues. As a quick test, set the maximum number of descriptors to generate per method to less than 70, so that you get Sub0, Sub1, ... generated. Then try `java -Xlog:init=debug -XX:+UnlockDiagnosticVMOptions -XX:+BytecodeVerificationLocal -version` to see if the verify is okay with it.

Thank you for the hint - this is the output. -- Now, I have more food-for-thought. ^^


$ build/windows-x86_64-server-release/images/jdk/bin/java --add-modules ALL-MODULE-PATH -Xlog:init=debug -XX:+UnlockDiagnosticVMOptions  -XX:+BytecodeVerificationLocal -version
Error occurred during initialization of boot layer
java.lang.VerifyError: Bad local variable type
Exception Details:
  Location:
    jdk/internal/module/SystemModules$all.moduleDescriptorsSub1([Ljava/lang/module/ModuleDescriptor;)V @19: aload
  Reason:
    Type top (current frame, locals[15]) is not assignable to reference type
  Current Frame:
    bci: @19
    flags: { }
    locals: { 'jdk/internal/module/Builder', '[Ljava/lang/module/ModuleDescriptor;' }
    stack: { 'jdk/internal/module/Builder', 'jdk/internal/module/Builder', '[Ljava/lang/module/ModuleDescriptor$Requires;', '[Ljava/lang/module/ModuleDescriptor$Requires;', integer }
  Bytecode:
    0000000: bb00 1159 1309 ddb7 0016 4b2a 2a05 bd00
    0000010: 1859 0319 0f12 13b8 0288 5359 0419 1213
    0000020: 02a4 b802 8853 b600 1c2a 07bd 001e 5903
    0000030: 1904 1309 dfb8 0038 5359 0419 0413 09e1
    0000040: b800 3853 5905 1904 1309 e3b8 0038 5359
    0000050: 0619 0413 09e5 b800 3853 b601 8d2a 03bd
    0000060: 018f b601 932a 1917 b601 dd57 2a03 bd01
    0000070: dfb6 01f4 1309 df13 09e1 1309 e313 09e5
    0000080: b801 004d 2a2c b602 7357 2a13 0275 b602
    0000090: 7957 2b10 462a 1309 e6b6 027e 53b1

        at java.base/jdk.internal.module.SystemModulesMap.allSystemModules(Unknown Source)
        at java.base/jdk.internal.module.SystemModuleFinders.allSystemModules(SystemModuleFinders.java:102)
        at java.base/jdk.internal.module.ModuleBootstrap.boot2(ModuleBootstrap.java:236)
        at java.base/jdk.internal.module.ModuleBootstrap.boot(ModuleBootstrap.java:174)
        at java.base/java.lang.System.initPhase2(System.java:2214)

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

PR: https://git.openjdk.org/jdk/pull/10704


More information about the core-libs-dev mailing list