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

javac hangs when compiling a class that references a cyclically inherited class

    Details

    • Subcomponent:
    • Resolved In Build:
      b08
    • CPU:
      x86
    • OS:
      linux
    • Verification:
      Verified

      Backports

        Description

        FULL PRODUCT VERSION :
        javac 1.6.0_20

        ADDITIONAL OS VERSION INFORMATION :
        Linux 2.6.18-238.19.1.el5 #1 SMP x86_64 GNU/Linux

        A DESCRIPTION OF THE PROBLEM :
        javac hangs when compiling a class C, which references a class A that suffers from cyclic inheritance.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        1) Create a directory "A_extends_B" containing A.java and B.java as below.
        -----------------------------------
        public class A extends B
        {
        }
        -----------------------------------
        public class B
        {
        }
        -----------------------------------

        2) Compile the classes.

        3) Create a directory "B_extends_A" containing A.java and B.java as below:
        -----------------------------------
        public class A
        {
        }
        -----------------------------------
        public class B extends A
        {
        }
        -----------------------------------

        4) Compile the classes.

        5) Create a directory "circular_inheritance" containing C.java as below:
        -----------------------------------
        public class C
        {
          A a = new A();
        }
        -----------------------------------

        6) Copy A_extends_B/A.class and B_extends_A/B.class to circular_inheritance.

        7) Compile C.java

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        An error.
        ACTUAL -
        javac hangs indefinitely.

        REPRODUCIBILITY :
        This bug can be reproduced always.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dmeetry Dmeetry Degrave (Inactive)
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: