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

unbounded number of recursive invocations causes VM crash

XMLWordPrintable

    • 1.2beta3
    • sparc
    • solaris_2.5.1
    • Verified



      Name: laC46010 Date: 12/05/97



      The following example causes VM crash in jdk1.2X.

      ------------------------------------- file exceptions03102.java
      public class exceptions03102 {

      static void recursive() {
      recursive();
      }
          
      public static void main(String argv[]) {
      try {
      recursive();
      } catch (StackOverflowError e) {
      return;
      } catch (Throwable e) {
      throw new RuntimeException("Unexpected exception (instead of a StackOverflowError) : " + e);
      }
      throw new RuntimeException("Cannot get a StackOverflowError");
      }
      }
      ------------------------------------- end of file exceptions03102.java

      Running the test:
      % setenv CLASSPATH .
      %/export/ld14/java/dest/jdk1.2X/solaris/bin/javac -d . exceptions03102.java
      % /export/ld14/java/dest/jdk1.2X/solaris/bin/java -verify exceptions03102
      Segmentation Fault (core dumped)
      %

      This takes place in jdk versions: 1.2*
      When java invoked without "-verify" argument, test passes successfully.
      In jdk versions below 1.2 (1.1.5, 1.1.4, 1.1.1, etc) test passes successfully
      with and without "-verify" argument supplied.

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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: