JDK-4692666 : "java.lang.InternalError: assertion failed" in Compiler
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2002-05-28
  • Updated: 2002-05-29
  • Resolved: 2002-05-29
Related Reports
Duplicate :  
Description

Name: nt126004			Date: 05/28/2002


FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

FULL OPERATING SYSTEM VERSION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
A java.lang.Internal error occurs when trying to compile
the code entered in the field source code.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. just compile the source.
2.
3.

EXPECTED VERSUS ACTUAL BEHAVIOR :
expected: a compiled file
result: an error

ERROR MESSAGES/STACK TRACES THAT OCCUR :

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
checkin
g the Bug Parade for duplicates. Include your program and the following
diagnost
ic in your report.  Thank you.
java.lang.InternalError: assertion failed
        at com.sun.tools.javac.v8.util.Util.assertion(Util.java:34)
        at com.sun.tools.javac.v8.code.Code.emitop(Code.java:377)
        at com.sun.tools.javac.v8.comp.Items$MemberItem.invoke(Items.java:518)
        at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:1163)
        at com.sun.tools.javac.v8.tree.Tree$Apply.visit(Tree.java:869)
        at com.sun.tools.javac.v8.comp.Gen.genExpr(Gen.java:596)
        at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:1101)
        at com.sun.tools.javac.v8.tree.Tree$Exec.visit(Tree.java:765)
        at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:436)
        at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:473)
        at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:457)
        at com.sun.tools.javac.v8.comp.Gen.genStats(Gen.java:508)
        at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:699)
        at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:539)
        at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:436)
        at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:473)
        at com.sun.tools.javac.v8.comp.Gen.genMethod(Gen.java:653)
        at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:626)
        at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:474)
        at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:436)
        at com.sun.tools.javac.v8.comp.Gen.genClass(Gen.java:1625)
        at com.sun.tools.javac.v8.JavaCompiler.genCode(JavaCompiler.java:324)
        at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:425)
        at com.sun.tools.javac.v8.Main.compile(Main.java:526)
        at com.sun.tools.javac.Main.compile(Main.java:32)
        at com.sun.tools.javac.Main.main(Main.java:23)

This bug can be reproduced always.

---------- BEGIN SOURCE ----------
--attached--
----------------- END SOURCE --------------------
(Review ID: 147087) 
======================================================================

Comments
PUBLIC COMMENTS ...
10-06-2004

EVALUATION It is certainly a bug that the compiler fails when a method has 2000 parameters, rather than give an appropriate error message. I don't think this is likely to be a problem in practice. ###@###.### 2002-05-29
29-05-2002