Name: laC46010 Date: 06/25/99
New javac (jdk1.3-H) fails to pass the following JCK-122 test:
lang/STMT/stmt035/stmt03505/stmt03505.html
Note that this is regression of bug#4157779 fixed in jdk1.2fcs.
and oldjavac also passes the test successfully.
See reduced test source and compiler output below.
------------------------------------------------------------------------------
public class stmt03505 {
public static void main(String argv[]) {
System.exit(run() + 95/*STATUS_TEMP*/);
}
public static int run() {
try {
switch ( 0 ) {
case 0:
case 1 - (1<<31):
case (1<<31):
}
return 0;/*STATUS_PASSED*/
} catch( OutOfMemoryError e) {
return 2;/*STATUS_FAILED*/
}
}
}
-------------------------------- output --------------------------------------
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError
at com.sun.tools.javac.v8.code.Code.emit1(Code.java, Compiled Code)
at com.sun.tools.javac.v8.code.Code.emit4(Code.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.tree.Tree$Switch.visit(Tree.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genStats(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genTry(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.tree.Tree$Try.visit(Tree.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genStats(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genMethod(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.comp.Gen.genClass(Gen.java, Compiled Code)
at com.sun.tools.javac.v8.JavaCompiler.genCode(JavaCompiler.java, Compiled Code)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java, Compiled Code)
at com.sun.tools.javac.v8.Main.compile(Main.java, Compiled Code)
at com.sun.tools.javac.Main.main(Main.java, Compiled Code)
======================================================================
Name: ssC76496 Date: 07/27/99
Error occurs in JDK1.3H build. Fix verified in JDK1.3L build.
###@###.###, 27 July 99.
======================================================================
Name: ssC76496 Date: 08/09/99
out of memory does not occur in new javac
###@###.###, 10 Aug 99.
======================================================================
- relates to
-
JDK-4368309 Simple switch statement with large case values gives OutOfMemoryError in javac
- Closed