-
Bug
-
Resolution: Fixed
-
P2
-
7
-
b120
-
unknown
-
generic
-
Not verified
The following code crashes javac:
class Crash {
interface Foo {}
static class X1 extends Exception implements Foo {}
static class X2 extends Exception implements Foo {}
public static void main(String[] args) {
try {
if (args.length == 0)
throw new X1();
else
throw new X2();
}
catch (X1|X2 ex) {
}
}
}
Stack:
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.
java.lang.AssertionError
at com.sun.tools.javac.jvm.ClassWriter.enterInner(ClassWriter.java:996)
at com.sun.tools.javac.jvm.ClassWriter.writePool(ClassWriter.java:533)
at com.sun.tools.javac.jvm.ClassWriter.writeClassFile(ClassWriter.java:1698)
at com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1579)
at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:685)
at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1413)
at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1381)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:836)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:795)
at com.sun.tools.javac.main.Main.compile(Main.java:418)
at com.sun.tools.javac.main.Main.compile(Main.java:336)
at com.sun.tools.javac.main.Main.compile(Main.java:327)
at com.sun.tools.javac.Main.compile(Main.java:82)
at com.sun.tools.javac.Main.main(Main.java:67)
class Crash {
interface Foo {}
static class X1 extends Exception implements Foo {}
static class X2 extends Exception implements Foo {}
public static void main(String[] args) {
try {
if (args.length == 0)
throw new X1();
else
throw new X2();
}
catch (X1|X2 ex) {
}
}
}
Stack:
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.
java.lang.AssertionError
at com.sun.tools.javac.jvm.ClassWriter.enterInner(ClassWriter.java:996)
at com.sun.tools.javac.jvm.ClassWriter.writePool(ClassWriter.java:533)
at com.sun.tools.javac.jvm.ClassWriter.writeClassFile(ClassWriter.java:1698)
at com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1579)
at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:685)
at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1413)
at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1381)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:836)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:795)
at com.sun.tools.javac.main.Main.compile(Main.java:418)
at com.sun.tools.javac.main.Main.compile(Main.java:336)
at com.sun.tools.javac.main.Main.compile(Main.java:327)
at com.sun.tools.javac.Main.compile(Main.java:82)
at com.sun.tools.javac.Main.main(Main.java:67)
- relates to
-
JDK-8289975 Multi-catch leads to IllegalAccessError when least-upper-bound is inaccessible
-
- Open
-
-
JDK-7005371 Multicatch: assertion error while generating LocalVariableTypeTable attribute
-
- Closed
-
-
JDK-8199910 Compiler crashes with -g option and variables of intersection type inferred by `var`
-
- Closed
-