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

Javac on bad class file get ArrayIndexOutOfBoundsException at com.sun.tools.javac.jvm.ClassReader.nextInt(ClassReader.java:379)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 9
    • tools

      to reproduce run javac for attached Sample.java file with Complicated.class in classpath
      javac Sample.java

      You get:
      An exception has occurred in the compiler (1.8.0_20-ea). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
      java.lang.ArrayIndexOutOfBoundsException: 2230794
      at com.sun.tools.javac.jvm.ClassReader.nextInt(ClassReader.java:379)
      at com.sun.tools.javac.jvm.ClassReader.skipMember(ClassReader.java:2167)
      at com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:2221)
      at com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:2322)
      at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:2509)
      at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:2440)
      at com.sun.tools.javac.jvm.ClassReader.access$000(ClassReader.java:76)
      at com.sun.tools.javac.jvm.ClassReader$1.complete(ClassReader.java:240)
      at com.sun.tools.javac.code.Symbol.complete(Symbol.java:574)
      at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1037)
      at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:2621)
      at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:1886)
      at com.sun.tools.javac.comp.Resolve.findGlobalType(Resolve.java:1986)
      at com.sun.tools.javac.comp.Resolve.findType(Resolve.java:2060)
      at com.sun.tools.javac.comp.Resolve.findIdent(Resolve.java:2089)
      at com.sun.tools.javac.comp.Resolve.resolveIdent(Resolve.java:2363)
      at com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:3174)
      at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:2011)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
      at com.sun.tools.javac.comp.Attr.attribType(Attr.java:669)
      at com.sun.tools.javac.comp.Attr.attribType(Attr.java:662)
      at com.sun.tools.javac.comp.MemberEnter.visitVarDef(MemberEnter.java:656)
      at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:852)
      at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:437)
      at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:449)
      at com.sun.tools.javac.comp.MemberEnter.finishClass(MemberEnter.java:459)
      at com.sun.tools.javac.comp.MemberEnter.finish(MemberEnter.java:1409)
      at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:1207)
      at com.sun.tools.javac.code.Symbol.complete(Symbol.java:574)
      at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1037)
      at com.sun.tools.javac.comp.Enter.complete(Enter.java:493)
      at com.sun.tools.javac.comp.Enter.main(Enter.java:471)
      at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:982)
      at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
      at com.sun.tools.javac.main.Main.compile(Main.java:523)
      at com.sun.tools.javac.main.Main.compile(Main.java:381)
      at com.sun.tools.javac.main.Main.compile(Main.java:370)
      at com.sun.tools.javac.main.Main.compile(Main.java:361)
      at com.sun.tools.javac.Main.compile(Main.java:56)
      at com.sun.tools.javac.Main.main(Main.java:42)

            jlahoda Jan Lahoda
            anazarov Andrey Nazarov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: