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

javac infinite loop with I/O error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.3.1
    • 1.1.5
    • tools
    • ladybird
    • sparc
    • solaris_2.5.1
    • Verified



        Name: mf23781 Date: 01/09/98


        javac enters an infinite loop printing out the message

          error: I/O error in /tmp/test_package/B.class.

        when it encounters a .class file that is a soft link that
        points to a non-existent file.

        Test case can be reproduced as follows

          1. mkdir /tmp/test_package
          2. cd /tmp/test_package
          3. cat > A.java
             package test_package;

             public class A
             {
               public static void A()
               {
                 B b;
               }
             }
             ^D
          4. export CLASSPATH=/tmp
          5. ln -s .deletedFile B.class
          6. javac A.java

        The function loadDefinition in file
        sun/tools/javac/BatchEnvironment.java does not call
        c.setDefinition to reset the status before returning
        on line 344.
        This function is called from inside a for (;;) loop in the
        function getClassDefinition() in the file
        sun/tools/java/ClassDeclaration.java
        If the status is not modified then the for (;;) loop will
        continue indefinitley

        ****
        It should be noted that this is not the only place that
        loadDefinition returns without setting the status and the
        rest of the function needs to be investigated
        ****

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

              gafter Neal Gafter (Inactive)
              miflemi Mick Fleming
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: