JDK-7005371 : Multicatch: assertion error while generating LocalVariableTypeTable attribute
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: unknown
  • Submitted: 2010-12-08
  • Updated: 2018-03-21
  • Resolved: 2011-03-08
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.
JDK 7
7 b123Fixed
Related Reports
Relates :  
Relates :  
Description
A regression test in our hudson build is failing with the following message:

    [jtreg] reason: User specified action: run compile Pos08.java 
    [jtreg] elapsed time (seconds): 0.054
    [jtreg] direct:
    [jtreg] An exception has occurred in the compiler (1.7.0-internal). 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.
    [jtreg] java.lang.AssertionError: Unexpected intersection type: java.lang.Exception&Pos08.Foo
    [jtreg] 	at com.sun.tools.javac.jvm.ClassWriter.enterInner(ClassWriter.java:997)
    [jtreg] 	at com.sun.tools.javac.jvm.ClassWriter.assembleClassSig(ClassWriter.java:374)
    [jtreg] 	at com.sun.tools.javac.jvm.ClassWriter.assembleSig(ClassWriter.java:302)
    [jtreg] 	at com.sun.tools.javac.jvm.ClassWriter.typeSig(ClassWriter.java:426)
    [jtreg] 	at com.sun.tools.javac.jvm.ClassWriter.writeCode(ClassWriter.java:1195)
    [jtreg] 	at com.sun.tools.javac.jvm.ClassWriter.writeMethod(ClassWriter.java:1087)
    [jtreg] 	at com.sun.tools.javac.jvm.ClassWriter.writeMethods(ClassWriter.java:1563)
    [jtreg] 	at com.sun.tools.javac.jvm.ClassWriter.writeClassFile(ClassWriter.java:1644)
    [jtreg] 	at com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1581)
    [jtreg] 	at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:695)
    [jtreg] 	at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1424)
    [jtreg] 	at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1392)
    [jtreg] 	at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:847)
    [jtreg] 	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:806)
    [jtreg] 	at com.sun.tools.javac.main.Main.compile(Main.java:418)
    [jtreg] 	at com.sun.tools.javac.main.Main.compile(Main.java:336)
    [jtreg] 	at com.sun.tools.javac.main.Main.compile(Main.java:327)
    [jtreg] 	at com.sun.tools.javac.Main.compile(Main.java:100)
    [jtreg] 	at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
    [jtreg] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [jtreg] 	at java.lang.reflect.Method.invoke(Method.java:613)
    [jtreg] 	at com.sun.javatest.lib.JavaCompileCommand.run(JavaCompileCommand.java:243)
    [jtreg] 	at com.sun.javatest.regtest.CompileAction.runCompile(CompileAction.java:554)
    [jtreg] 	at com.sun.javatest.regtest.CompileAction.runSameJVM(CompileAction.java:402)
    [jtreg] 	at com.sun.javatest.regtest.CompileAction.run(CompileAction.java:264)

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/build/langtools/rev/e3df8d7a9752
25-12-2010

SUGGESTED FIX A webrev of this fix is available at the following URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/e3df8d7a9752
09-12-2010

WORK AROUND Do not pass the '-g' flag to javac
08-12-2010

EVALUATION Similar to 6999635. Javac tries to write an intersection type into the constant pool. Intersection types are not supported by the grammar of the signature attribute, hence the assertion error.
08-12-2010