Compiler crash with -parameters - need help to open a bug
Boaz Nahum
boaznahum at gmail.com
Sun Mar 23 12:40:01 UTC 2014
Actaully '-XDverboseCompilePolicy and -Xdiags:verbose' are not ignored, it
is just that the exception occurs too early. If I remove '-parameters' then
they do the work ....
On Sun, Mar 23, 2014 at 2:29 PM, Boaz Nahum <boaznahum at gmail.com> wrote:
> When compiling our code with '-parameters' (1.8.0_20-ea and 1.8.0-b132),
> we got this exception:
>
> An exception has occurred in the compiler (1.8.0). Please file a bug at
> the Java Developer/bugreport) after checking the Bug Parade for
> duplicates. Include your program and the following diagnostic in your
> report. Thank you.
> java.lang.ClassCastException: java.lang.String cannot be cast to
> com.sun.tools.javac.util.Name
> at
> com.sun.tools.javac.jvm.ClassReader.readName(ClassReader.java:602)
> at
> com.sun.tools.javac.jvm.ClassReader.setParameterNames(ClassReader.java:2130)
> at
> com.sun.tools.javac.jvm.ClassReader.readMethod(ClassReader.java:2031)
> at
> com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:2234)
> at
> com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:2306)
> at
> com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:2493)
> at
> com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:2424)
> at
> com.sun.tools.javac.jvm.ClassReader.access$000(ClassReader.java:76)
> at
> com.sun.tools.javac.jvm.ClassReader$1.complete(ClassReader.java:244)
> at com.sun.tools.javac.code.Symbol.complete(Symbol.java:560)
> at
> com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1024)
> at
> com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:2605)
> at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:1868)
> at
> com.sun.tools.javac.comp.Resolve.findIdentInPackage(Resolve.java:2107)
> at com.sun.tools.javac.comp.Attr.selectSym(Attr.java:3358)
> at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3257)
> at
> com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1891)
> at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596)
> at com.sun.tools.javac.comp.Attr.attribType(Attr.java:658)
> at com.sun.tools.javac.comp.Attr.attribType(Attr.java:651)
> at
> com.sun.tools.javac.comp.MemberEnter.attribImportType(MemberEnter.java:836)
> at
> com.sun.tools.javac.comp.MemberEnter.visitImport(MemberEnter.java:556)
> at com.sun.tools.javac.tree.JCTree$JCImport.accept(JCTree.java:571)
> at
> com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:435)
> at
> com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:447)
> at
> com.sun.tools.javac.comp.MemberEnter.visitTopLevel(MemberEnter.java:526)
> at
> com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:518)
> at
> com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:435)
> at
> com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:1038)
> at com.sun.tools.javac.code.Symbol.complete(Symbol.java:560)
> at
> com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1024)
> at com.sun.tools.javac.comp.Enter.complete(Enter.java:497)
> at com.sun.tools.javac.comp.Enter.main(Enter.java:475)
> at
> com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:985)
> at
> com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
> 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)
>
>
> Thanks
> Boaz
>
>
>
> In order to isolate the problematic code, I add -XDverboseCompilePolicy
> and -Xdiags:verbose, without luck.
> Why they are ignored ?
>
> Please note that an annotation processor is involved.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20140323/205a977d/attachment-0001.html>
More information about the compiler-dev
mailing list