Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4053605

CompilerError: stack depth error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.2.0
    • 1.1, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2.0
    • tools
    • 1.2beta4
    • generic, x86, sparc
    • generic, solaris_2.5.1, solaris_2.6, windows_95, windows_nt
    • Not verified



      Name: sgC58550 Date: 05/21/97


      1. compiling source file "ToolBox.java"
         c:>javac ToolBox.java
      2. Output as follows:
      ERROR: sun.tools.java.CompilerError: stack depth error 1/0: $36:
      -- listing --
      $31:
      279: try 1859802
      279: try 1859814
      280: iload 1
      280: ifne $41:
      281: aload 0
      281: invokevirtual int length()
      281: ###@###.###>
      281: pop
      281: goto $36:
      $41:
      283: iload 1
      283: iflt $44:
      284: iload 1
      284: aload 0
      284: invokevirtual int length()
      284: if_icmplt $42:
      $44:
      285: new class myException
      285: dup
      285: new class java.lang.StringBuffer
      285: dup
      285: ldc "Caught StringIndexOutOfBoundsException. theStartPosition = "
      285: invokespecial java.lang.StringBuffer(java.lang.String)
      285: iload 1
      285: invokevirtual java.lang.StringBuffer append(int)
      285: invokevirtual java.lang.String toString()
      285: invokespecial myException(java.lang.String)
      285: athrow
      $42:
      287: iload 1
      287: aload 0
      287: invokevirtual int length()
      287: iconst_1 1
      287: isub
      287: if_icmpne $45:
      288: lconst_0 0
      288: pop
      288: goto $36:
      $45:
      290: aload 0
      290: invokevirtual int length()
      290: i2l
      290: iload 1
      290: i2l
      290: lsub
      290: pop
      290: goto $36:
      $38:
      $39:
      292: astore 2
      293: getstatic java.io.PrintStream err
      293: new class java.lang.StringBuffer
      293: dup
      293: ldc "Caught StringIndexOutOfBoundsException: "
      293: invokespecial java.lang.StringBuffer(java.lang.String)
      293: aload 2
      293: invokevirtual java.lang.String getMessage()
      293: invokevirtual java.lang.StringBuffer append(java.lang.String)
      293: invokevirtual java.lang.String toString()
      293: invokevirtual void println(java.lang.String)
      294: lconst_0 0
      294: pop
      294: goto $36:
      $40:
      296: astore 2
      297: getstatic java.io.PrintStream err
      297: new class java.lang.StringBuffer
      297: dup
      297: ldc "lenTheString() ClassCastException: "
      297: invokespecial java.lang.StringBuffer(java.lang.String)
      297: aload 2
      297: invokevirtual java.lang.String getMessage()
      297: invokevirtual java.lang.StringBuffer append(java.lang.String)
      297: invokevirtual java.lang.String toString()
      297: invokevirtual void println(java.lang.String)
      298: lconst_0 0
      298: pop
      298: goto $36:
      $33:
      $34:
      279: pop
      $36:
      301: getstatic java.io.PrintStream out
      301: ldc "Return value may be unreliable"
      301: invokevirtual void println(java.lang.String)
      302: lconst_0 0
      302: lreturn
      sun.tools.java.CompilerError: stack depth error 1/0: $36
      at sun.tools.asm.Assembler.balance(Assembler.java:258)
      at sun.tools.asm.Assembler.balance(Assembler.java:288)
      at sun.tools.asm.Assembler.balance(Assembler.java:352)
      at sun.tools.asm.Assembler.write(Assembler.java:380)
      at sun.tools.javac.SourceClass.compileClass(SourceClass.java:1331)
      at sun.tools.javac.SourceClass.compile(SourceClass.java:1083)
      at sun.tools.javac.Main.compile(Main.java:325)
      at sun.tools.javac.Main.main(Main.java:463)
      error: An error has occurred in the compiler; please file a bug report (###@###.###).
      1 error
      --------- End of listing

      company - Kale Consultants Pvt. Ltd.
      ======================================================================

            dstoutamsunw David Stoutamire (Inactive)
            sgoodsunw Sheri Good (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: