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

VM crashes!

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.2.2
    • vm-legacy



      Name: skT88420 Date: 07/20/99


      java full version "JDK-1.2.2-U"

      If this is a dup, sorry, I really don't know what to search for
      on this one - it is a strange problem.

      The following code crashes the vm with

      "The instruction at "0x504de294" referenced memory at "0x000329dc". The memory
      could not be "read".

      Run with -Djava.compiler=NONE there is no problem, also with
      jdk1.2.1 there is no problem.

      Thanks,
      Steven

      ---code---
      import java.util.*;

      public class TestCrash
      {
       
          public TestCrash()
          {
          }

          static Runtime rt = Runtime.getRuntime();
          static long mem = 0;
          public static void printMemory(String msg)
          {
              while(mem != rt.totalMemory() - rt.freeMemory()) {
                  mem = rt.totalMemory() - rt.freeMemory();
                  System.gc();
              }
              System.out.println(msg + ": " + mem);
          }
          
          public static void main(String[] args)
          {
              try {
                  printMemory("Start Test.");
              }
              catch (Exception e) {e.printStackTrace();}
          }
          
      }
      ---end code---
      (Review ID: 88154)
      ======================================================================

            Unassigned Unassigned
            skonchad Sandeep Konchady
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: