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

Abort while doing static initializations.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.1
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      1.1beta3
    • CPU:
      sparc
    • OS:
      solaris_2.5, solaris_2.5.1
    • Verification:
      Not verified

      Description


      allan.jacobs@Eng 1996-12-19

      The following code seg faults when interpreted.

      class X1 {
        static int i1;
        static {
          i1 = X.func3();
        }
      }

      class X2 extends X1{
        static int i3;
        static{
          i3 = X.func2();
        }
      }

      class X extends X2 {
         static int check2=0;
         static int check3=0;
         static int func2() {X.check2 = 10; return 10;}
         static int func3() {X.check3 = 10; return 10;}
         public static void main(String[] arg)
          {
            System.out.println(X.check2);
            System.out.println(X.check3);
          }
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nsaraiyasunw Nakul Saraiya (Inactive)
              Reporter:
              ajacobssunw Allan Jacobs (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: