Compiler crash with -parameters - need help to open a bug

Vicente-Arturo Romero-Zaldivar vicente.romero at oracle.com
Mon Mar 24 11:24:31 UTC 2014


Hi Boaz,

OK it seems like we both need more information :)

What version of javac is this? Can you get the last javac from 
http://hg.openjdk.java.net/jdk9/dev/langtools/ and try to reproduce the 
issue? Do you get any meaningful information after executing javac with 
plain "-verbose" option?

Thanks,
Vicente

On 24/03/14 07:10, Boaz Nahum wrote:
>
> That what I'm asking help for - to isolate  the problematic source.
> But from what I learnt - it is combination of source and dependencies. 
> The same source ***passed*** if it is complied with a dependency that 
> wasn't compile with "-parameters".
> What I need is a flag (or a patch) that causes the compiler to emit 
> verbose information
>
> Thanks
> Boaz
>
> On Mar 23, 2014 9:18 PM, "Vicente-Arturo Romero-Zaldivar" 
> <vicente.romero at oracle.com <mailto:vicente.romero at oracle.com>> wrote:
>
>     Hi Boaz,
>
>     Do you have an isolated test case?
>
>     Thanks,
>     Vicente
>
>     On 23/03/14 12:40, Boaz Nahum wrote:
>>     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
>>     <mailto: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
>>         <http://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/20140324/527dfadc/attachment.html>


More information about the compiler-dev mailing list