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

inner CompilerError : stack under flow

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      solaris_2.5.1, windows_98, windows_nt

      Description



      Name: clC74495 Date: 05/13/99


      When compiling the below Java source program, a CompilerError occurs.

      --- Error message
      E:>\jdk1.2.2\bin\javac Y.java
      ERROR: sun.tools.java.CompilerError: stack under flow: 27: invokespecial Outer1. 1$Local1(Outer1,int) = -1
      -- listing --
      $13:
      27: aload 0
      27: aload 2
      27: invokevirtual int intValue()
      27: invokespecial Outer1. 1$Local1(Outer1,int)
      26: return
      sun.tools.java.CompilerError: stack under flow: 27: invokespecial Outer1. 1$
      Local1(Outer1,int) = -1
              at sun.tools.asm.Assembler.balance(Assembler.java:249)
              at sun.tools.asm.Assembler.write(Assembler.java:381)
              at sun.tools.javac.SourceClass.compileClass(SourceClass.java:2410)
              at sun.tools.javac.SourceClass.compile(SourceClass.java:2039)
              at sun.tools.javac.Main.compile(Main.java:567)
              at sun.tools.javac.Main.main(Main.java:733)
      error: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (x: localized character: Japanese)
                       (mean: Error occured in compiler)
      http://java.sun.com/cgi-bin/bugreport.cgi xxxxxxxxxxxxxxxxxx
                       (mean: submit bug report)
      xxxxx 1 xx
        (mean: Error 1 mesaage)

      E:>


      --- source(Y.java)-----

      // Nothing / ClassType. / Primary.
      // this / super
      // Nothing / .field / .method(args) / (args)

      class Class1 {
      void f() {
      Object o1 = this; // NtN
      // Object o2 = super; // NsN - NG
      }
      }

      class Outer1 {
      int field1;
      void method1() {}

      Outer1(String s) {}

      void f() {
      new Class1() {
      };
      class Local1 {
      int field1;
      void dummy(int i) {}
      Local1(int i) {
      }
      Local1(Integer i) {
      Outer1.this(i.intValue()); // CtC
      }
      void method1() {
      dummy(Outer1.this.field1); // CtF
      Outer1.this.method1(); // CtM
      // new Outer1.this(0); // CtC NG
      }
      }
      }
      }

      class Outer2 {
      }
      (Review ID: 63136)
      ======================================================================
      william.maddox@Eng 1999-05-24

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              wmaddoxsunw William Maddox (Inactive)
              Reporter:
              clucasius Carlos Lucasius (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: