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

PrintBytecodePairHistogram assertion failure: value out of range

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b08
    • CPU:
      sparc
    • OS:
      solaris_1, solaris_7, solaris_8
    • Verification:
      Verified

      Description



      Name: szC45993 Date: 02/01/2000



      /net/sqesvr/vsn/testbase/testbase_nsk/src/nsk/arguments/args00127 test
      destroys java_g (java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-S)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S-debug, interpreted mode))
      on Solaris (SunOS 5.7 sun4u sparc).

      See log and source below.

      LOG:
      ====

      novo81% /export/ld24/java/hotspot/jdk1.3.0/solaris/bin/java_g -version
      java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-S)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S-debug, interpreted mode)
      novo81% cd /export/ld24/java/zss/TONGA_WSs/testbase_js/src/nsk/arguments/args00127
      novo81% /export/ld24/java/hotspot/jdk1.3.0/solaris/bin/java_g -XX:+PrintBytecodePairHistogram -verify args00127
      VM option '+PrintBytecodePairHistogram'
      #
      # HotSpot Virtual Machine Error, assertion failure
      #
      # assert(nbits == 32 || -(1 << nbits-1) <= x && x < ( 1 << nbits-1), "value out of range")
      #
      # Error ID: /usr/re/hotsparc_client1.3/ws/solsparc/hotsparc_client1.3fcs/build/solaris/../../src/cpu/sparc/vm/assembler_sparc.hpp, 960 [ Unknown ]
      #
      Dumping core....
      Abort (core dumped)
      novo81%


      SOURCE:
      ========
      //args00127.java
      /* This test simply creates a series of circularly
       * linked memeory objects which should be able to be
       * GC'd
       */


      class MemoryObject
      {
          byte array[];
          MemoryObject next;
          MemoryObject previous;

          public MemoryObject(int size)
          {
              array = new byte[size];
          }
      }

      class args00127
      {
          static final int ARRAY_SIZE = 100;
          static final int OBJECT_SIZE = 10;
          static final int LOOP_COUNT = 5;
          static final int CIRCULARITY_SIZE = 3;

          static MemoryObject memoryArray[] = new MemoryObject[ARRAY_SIZE];

          public static void main(String args[])
          {
              for (int j = 0; j < LOOP_COUNT; j++)
              {
                  System.out.println(j + ": " + Runtime.getRuntime().freeMemory());
                  for (int i = 0; i < ARRAY_SIZE; i ++)
                  {
                      memoryArray[i] = new MemoryObject(OBJECT_SIZE);
                      makeCircular(memoryArray[i], CIRCULARITY_SIZE);
                  }
              }

              // if there's any memory left, let's assume it's okay
              System.out.println("Test passed.");

          }

          public static void makeCircular(MemoryObject mObj, int depth)
          {
      MemoryObject tmpObj = mObj;

              for (int i = 0; i < depth; i++)
              {
                  tmpObj.next = new MemoryObject(OBJECT_SIZE);
                  tmpObj= tmpObj.next;
              }
      tmpObj.next = mObj;
          }

          public static void confirmCircular(MemoryObject mObj)
          {
      int count = 0;
      MemoryObject mObj2 = mObj;
      while (mObj2.next != mObj)
      {
      count++;
      mObj2 = mObj2.next;
      }
      System.out.println("Circularity level: " + count);
          }
      }
      //-------------------------------------------------------------


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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              coleenp Coleen Phillimore
              Reporter:
              zsssunw Zss Zss (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: