Date: Thu, 21 Mar 2002 04:51:52 -0500 (EST)
From: C. Scott Ananian
To: jsr14-prototype-comments@sun.com
Subject: Crash in 1.2 prototype compiler.
I've debugged this a bit, and I can only reproduce this when supplying a
java source file w/ an error in it. But the compiler shouldn't *ever*
crash, not even on invalid input.
Uncompress the attached file, cd to the 'bug2' directory, and execute
the commands in 'build-cmd'. (Make sure the JSR14DISTR env variable
is set correctly.) The result is appended.
Fixing the bug which javac complains about in CollectionWrapper (hey,
could you guys give us more of a heads-up in the CHANGES file when you
alter APIs like this?) makes the crash in SetWrapper/ListWrapper go
away. But, as I said, the compiler should never *crash*.
--scott
[compile CollectionWrapper separately to see an accurate non-crashing
report on the bug which javac is attempting to complain about. When
compiled w/ ListWrapper or SetWrapper, javac crashes.]
hack assassination Minister strategic DNC Semtex NORAD milita RUCKUS
explosives BATF Panama FBI affinity group SDI President IDEA Treasury
( http://lesser-magoo.lcs.mit.edu/~cananian )
---- output of 'build-cmd' follows ----
Util/Collections/CollectionWrapper.java:20: harpoon.Util.Collections.CollectionWrapper should be declared abstract; it does not define addAll(java.util.Collection) in harpoon.Util.Collections.CollectionWrapper
public class CollectionWrapper implements Collection {
^
An exception has occurred in the compiler (1.4.0). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.ClassCastException: com.sun.tools.javac.v8.code.Type$ForAll
at com.sun.tools.javac.v8.comp.Attr.adjustAbstractMethod(Attr.java:209)
at com.sun.tools.javac.v8.comp.Attr.implementInterfaceMethods(Attr.java:245)
at com.sun.tools.javac.v8.comp.Attr.attribClassBody(Attr.java:2005)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1984)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1948)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:352)
at com.sun.tools.javac.v8.Main.compile(Main.java:451)
at com.sun.tools.javac.Main.compile(Main.java:36)
at com.sun.tools.javac.Main.main(Main.java:27)
Util/Collections/CollectionWrapper.java:20: harpoon.Util.Collections.CollectionWrapper should be declared abstract; it does not define addAll(java.util.Collection) in harpoon.Util.Collections.CollectionWrapper
public class CollectionWrapper implements Collection {
^
An exception has occurred in the compiler (1.4.0). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.ClassCastException: com.sun.tools.javac.v8.code.Type$ForAll
at com.sun.tools.javac.v8.comp.Attr.adjustAbstractMethod(Attr.java:209)
at com.sun.tools.javac.v8.comp.Attr.implementInterfaceMethods(Attr.java:245)
at com.sun.tools.javac.v8.comp.Attr.attribClassBody(Attr.java:2005)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1984)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1948)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:352)
at com.sun.tools.javac.v8.Main.compile(Main.java:451)
at com.sun.tools.javac.Main.compile(Main.java:36)
at com.sun.tools.javac.Main.main(Main.java:27)
[ Part 2, "" Application/OCTET-STREAM (Name: "bug2.tgz") 2KB. ]