Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8282564

tools/jpackage/share/LicenseTest.java#id0 fails with "ArrayIndexOutOfBoundsException: arraycopy: last source index 9642141 out of bounds for byte[14056]"

XMLWordPrintable

    • aarch64
    • os_x

      The following test failed in the JDK19 CI:

      tools/jpackage/share/LicenseTest.java#id0

      Here's a snippet from the log file:

          jlink --output /var/folders/sk/lyy6ln9922qd4vf88c1mh35r0000gp/T/jdk.jpackage5178298770556072745/images/image-16759864501726969967/CommonLicenseTest.app/Contents/runtime/Contents/Home --module-path /System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-19+12-726/macosx-aarch64.jdk/jdk-19.jdk/Contents/Home/jmods --add-modules java.rmi,jdk.management.jfr,jdk.jdi,jdk.charsets,jdk.xml.dom,java.xml,java.datatransfer,jdk.jstatd,jdk.httpserver,java.desktop,java.security.sasl,jdk.zipfs,java.base,jdk.crypto.ec,jdk.javadoc,jdk.management.agent,jdk.jshell,jdk.editpad,jdk.sctp,java.sql.rowset,jdk.jsobject,jdk.jlink,java.smartcardio,jdk.unsupported,java.security.jgss,java.compiler,jdk.nio.mapmode,jdk.dynalink,jdk.unsupported.desktop,jdk.accessibility,jdk.security.jgss,jdk.incubator.vector,java.sql,java.xml.crypto,java.logging,java.transaction.xa,jdk.jfr,jdk.crypto.cryptoki,jdk.net,jdk.random,java.naming,jdk.internal.ed,java.prefs,java.net.http,jdk.compiler,jdk.naming.rmi,jdk.internal.opt,jdk.jconsole,jdk.attach,jdk.internal.le,java.management,jdk.jdwp.agent,jdk.incubator.foreign,jdk.internal.jvmstat,java.instrument,jdk.management,jdk.security.auth,java.scripting,jdk.jdeps,jdk.jartool,java.management.rmi,jdk.jpackage,jdk.naming.dns,jdk.localedata --strip-native-commands --strip-debug --no-man-pages --no-header-files
      [10:16:45.253] Output:
          WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign
      Error: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 9642141 out of bounds for byte[14056]
      java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 9642141 out of bounds for byte[14056]
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:194)
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.writeImage(ImageFileCreator.java:163)
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.create(ImageFileCreator.java:100)
      at jdk.jlink/jdk.tools.jlink.internal.JlinkTask$ImageHelper.retrieve(JlinkTask.java:871)
      at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.operate(ImagePluginStack.java:194)
      at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:436)
      at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:276)
      at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:55)
      at jdk.jlink/jdk.tools.jlink.internal.Main$JlinkToolProvider.run(Main.java:66)
      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:191)
      at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
      at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
      at jdk.jpackage/jdk.jpackage.internal.MacBaseInstallerBundler.prepareAppBundle(MacBaseInstallerBundler.java:167)
      at jdk.jpackage/jdk.jpackage.internal.MacPkgBundler.bundle(MacPkgBundler.java:151)
      at jdk.jpackage/jdk.jpackage.internal.MacPkgBundler.execute(MacPkgBundler.java:635)
      at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
      at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:561)
      at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:91)
      at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 9642141 out of bounds for byte[14056]
      at java.base/java.lang.System.arraycopy(Native Method)
      at java.base/jdk.internal.org.objectweb.asm.Attribute.read(Attribute.java:161)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.readAttribute(ClassReader.java:3545)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.readCode(ClassReader.java:1974)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1523)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:753)
      at java.base/jdk.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:432)
      at jdk.jlink/jdk.tools.jlink.internal.plugins.StripJavaDebugAttributesPlugin.lambda$transform$1(StripJavaDebugAttributesPlugin.java:64)
      at jdk.jlink/jdk.tools.jlink.plugin.ResourcePool.lambda$transformAndCopy$0(ResourcePool.java:112)
      at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
      at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
      at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
      at jdk.jlink/jdk.tools.jlink.plugin.ResourcePool.transformAndCopy(ResourcePool.java:111)
      at jdk.jlink/jdk.tools.jlink.internal.plugins.StripJavaDebugAttributesPlugin.transform(StripJavaDebugAttributesPlugin.java:54)
      at jdk.jlink/jdk.tools.jlink.internal.plugins.DefaultStripDebugPlugin.transform(DefaultStripDebugPlugin.java:76)
      at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.visitResources(ImagePluginStack.java:262)
      at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:184)
      ... 19 more

      Starting this bug off in tools/jpackage because that's where the test lives.

            sundar Sundararajan Athijegannathan
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: