JDK-8054275 : Javac on bad class file get java.lang.AssertionError at com.sun.tools.javac.jvm.ClassReader.readClassOrType(ClassReader.java:572)
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 9
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2014-08-04
  • Updated: 2017-09-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbd_majorUnresolved
Related Reports
Duplicate :  
Duplicate :  
Description
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.AssertionError
	at com.sun.tools.javac.util.Assert.error(Assert.java:126)
	at com.sun.tools.javac.util.Assert.check(Assert.java:45)
	at com.sun.tools.javac.jvm.ClassReader.readClassOrType(ClassReader.java:572)
	at com.sun.tools.javac.jvm.ClassReader.readPool(ClassReader.java:507)
	at com.sun.tools.javac.jvm.ClassReader.readClassSymbol(ClassReader.java:591)
	at com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:2209)
	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)