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

super() in constructor of java.lang.Object class crashes javac

    XMLWordPrintable

Details

    • sparc
    • solaris_2.5.1

    Description



      Name: laC46010 Date: 01/26/99



      The following funny corner case breaks javac (ver. 1.2.2) compilation
      to NullPointerException. If you try javac (ver 1.1.6) you'll get
      "segmentation fault" failure.

      Test example and javac diagnostics follow:
      -------------------------------------------------------
      novo35% cat test.java
      package java.lang;

      class Object {
          Object() {
              super();
          }
      }

      novo35% java -version
      java version "1.2.2"
      Classic VM (build JDK-1.2.2-C, green threads, sunwjit)
      novo35% javac test.java
      java.lang.NullPointerException
              at sun.tools.tree.MethodExpression.checkValue(Compiled Code)
              at sun.tools.tree.MethodExpression.check(Compiled Code)
              at sun.tools.tree.ExpressionStatement.check(Compiled Code)
              at sun.tools.tree.Statement.checkBlockStatement(Compiled Code)
              at sun.tools.tree.CompoundStatement.check(Compiled Code)
              at sun.tools.tree.Statement.checkMethod(Compiled Code)
              at sun.tools.javac.SourceMember.check(Compiled Code)
              at sun.tools.javac.SourceClass.checkMembers(Compiled Code)
              at sun.tools.javac.SourceClass.checkInternal(Compiled Code)
              at sun.tools.javac.SourceClass.check(Compiled Code)
              at sun.tools.javac.Main.compile(Compiled Code)
              at sun.tools.javac.Main.main(Compiled Code)
      error: An exception has occurred in the compiler; please file a bug report (
      http://java.sun.com/cgi-bin/bugreport.cgi).
      1 error
      -------------------------------------------------------

      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              wmaddoxsunw William Maddox (Inactive)
              leosunw Leo Leo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: