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

VM trows NullPointerException instead StackOverflowError

XMLWordPrintable

    • x86
    • solaris_2.4



      Name: akC45999 Date: 09/29/98



      Attached test shows that x86's VM trows NullPointerException instead StackOverflowError

      --------------------------------- exceptions03101.java

      import java.io.PrintStream;

      public class exceptions03101 {

        public static int counter = 1;

        static int Runner() {
      counter = counter * -1;
      int i = counter;
      if(counter < 2) counter += Runner();
      return i;
        }

        public static void main(String argv[]) {

      try{
      Runner();
      } catch (Throwable e) {
      System.out.println(e);
      }
        }
      }

      -------------------------------- dotest

      TESTCLASSES=/net/novo48/opt/home/testclasses
      CLASSPATH=$TESTCLASSES
      export CLASSPATH

      /export/ld14/java/dest/jdk1.2fcsK/x86/bin/javac -d $TESTCLASSES *.java
      /export/ld14/java/dest/jdk1.2fcsK/x86/bin/java -verify exceptions03101

      ---------------------------------- output

      novo26% dotest
      java.lang.NullPointerException
      novo26%

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

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

            never Tom Rodriguez
            rfqsunw Rfq Rfq (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: