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

bug err327 causes a stack overflow

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      1.0fcs
    • CPU:
      sparc
    • OS:
      solaris_2.4, solaris_2.5, solaris_10
    • Verification:
      Not verified

      Description

      This code:
      ***
      class Bar extends Foo {
      }
      class Foo extends Bar {
      }
      ***

      causes this error:

      java.lang.StackOverflowError
              at sun.tools.javac.SourceClass.basicCheck(SourceClass.java:430)
              at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:116)
              at sun.tools.javac.SourceClass.basicCheck(SourceClass.java:435)
              at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:116)
              at sun.tools.javac.SourceClass.basicCheck(SourceClass.java:435)
              at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:116)
              at sun.tools.javac.SourceClass.basicCheck(SourceClass.java:435)
              at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:116)
              at sun.tools.javac.SourceClass.basicCheck(SourceClass.java:435)
              at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:116)
              at sun.tools.javac.SourceClass.basicCheck(SourceClass.java:435)
              at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:116)
              at sun.tools.javac.SourceClass.basicCheck(SourceClass.java:435)
              at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:116)
              at sun.tools.javac.SourceClass.basicCheck(SourceClass.java:435)
              at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:116)
              at sun.tools.javac.SourceClass.basicCheck(SourceClass.java:435)
              at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:116)
              at sun.tools.javac.SourceClass.basicCheck(SourceClass.java:435)
              at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:116)
      error: An error has occurred in the compiler; please file a bug report (###@###.###).
      1 error

      using the 1.0betaK compiler (current compiler as of Oct. 11, 1995).

      The description field as copied from bug report 1225972 follows:

      The JDK prebeta1 compiler generates a StackOverflowError when compiling the
      following (incorrect) program

      =========================
      class Foo extends Foo {
      }

      =========================
      calterra% javac test2.java
      java.lang.StackOverflowError
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:118)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java:439)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:118)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java:439)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:118)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java:439)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:118)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java:439)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:118)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java:439)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:118)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java:439)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:118)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java:439)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:118)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java:439)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:118)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java:439)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java:118)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java:439)
      error: An error has occurred in the compiler, please file a bug report (###@###.###).
      1 error
      calterra%

      The description field as copied from bug report 1226825 follows:

      The following stupid program, typed in error, caused the compiler to crash

      class Fifo implementd Fifo { }



      gzilla% javac ListFifo.java
      java.lang.StackOverflowError
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
      at java.tools.javac.SourceClass.basicCheck(SourceClass.java)
      at java.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
      error: An error has occurred in the compiler, please file a bug report (###@###.###).
      1 error
      gzilla%

        Attachments

          Activity

            People

            Assignee:
            fyellinsunw Frank Yellin (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: