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

infinite recursion in FindClass

    Details

    • Subcomponent:
    • CPU:
      x86, sparc
    • OS:
      solaris_2.5.1, windows_nt

      Description



      Name: laC46010 Date: 08/17/98



      The following test fails on Solaris VM (1.2beta4-1.2fcsF)
      with core dump:
      Segmentation Fault (core dumped) if JIT is enabled.
      If it is off, test hangs for indefinite period. In some
      cases it also crashes to Segmentation Fault
      while CTRL-C. is pressed. On Win32 this example
      returns wrong status. The modified one leads to crash
      (commented line in example).

      Test example and VM diagnostics follow:
      -------------------------------------------------------
      novo35% cat test.java
      import java.io.PrintStream;
      public class test {
         static int r = 1;
         public static void main(String argv[]) {
              System.exit(run(argv, System.out));
          }
          public static int run(String argv[], PrintStream out) {
             try {
                try {
                   r++;
                   if ( r>58161 ) out.println("r=" + r + " ");
                   // if ( r%100 == 0 ) out.println("r=" + r + " ");
      /*Crashes on NT*/
                   run(argv,out);
                } catch ( StackOverflowError e) {
                   System.out.println("Recursion depth: " + r);
                   return 0;
                }
             } catch (Throwable e) {
                System.out.println("Error! Exception : " + e);
                return 2;
             }
             return 2;
          }
      }
      novo35% java -version
      java version "1.2fcs"
      Classic VM (build JDK-1.2fcs-F, green threads, sunwjit)
      novo35% javac test.java
      novo35% java -verify test
      r=58162
      Segmentation Fault

      B:\ld22\java\sns\run>B:\ld14\java\dest\jdk1.2fcsE\win32\bin\java
      -version
      java version "1.2fcs"
      Classic VM (build JDK-1.2fcs-E, native threads)
      B:\ld22\java\sns\run>B:\ld14\java\dest\jdk1.2fcsE\win32\bin\javac
      test.java
      B:\ld22\java\sns\run>B:\ld14\java\dest\jdk1.2fcsE\win32\bin\java -verify
      test
      Status=128

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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sliangsunw Sheng Liang (Inactive)
                Reporter:
                leosunw Leo Leo (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: