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

Linux: Hotspot build 1.3.0beta-b01 throws invalid NullPointerException

    XMLWordPrintable

    Details

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

      Description



      Name: dkC103137 Date: 04/25/2000



      Hotspot Client VM (build 1.3-internal-release, mixed mode),
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0beta-b01), throws
      NullPointerException instead of StackOverflowError or OutOfMemoryError while infinite
      recursive method invocation. See test source and diagnostics below.

      You need compile the test.java file with oldjavac, because javac crashes
      while compiling the test.

      The bug can be reproduced in
      /net/sqesvr/vsn/GammaBase/Bugs/<this bug number>
      directory, using doit.sh script.

      -------------------------- test.java ---------------------------------
      public class test {

        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 (StackOverflowError e) {
                      System.out.println("OK! StackOverflowError was thrown");
              } catch (OutOfMemoryError e) {
                      System.out.println("OK! OutOfMemoryError was thrown");
              } catch (NullPointerException e) {
                      System.out.println("Error! NullPointerException was thrown");
              }
        }
      }

      -------------------------- output ------------------------------------
      % ~/localjdk1.3/linux/bin/java test
      Error! NullPointerException was thrown
      %

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

        Attachments

          Activity

            People

            Assignee:
            hongzh Hong Zhang
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: