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

Unsafe API: Three failures in Unsafe.allocateMemory(long)

XMLWordPrintable

    • beta
    • sparc
    • solaris_8
    • Verified



      Name: elR10090 Date: 02/28/2001



      Java HotSpot Server VM (build 1.4.0-beta-b53) fails to pass the test:

          nsk/serial/Unsafe/allocateMemory/allocmem001
          
      This test tries to allocate memory with negative size and expects
      IllegalArgumentException.

      Three failures were observed in the method Unsafe.allocateMemory(long).

      1. 64-bit server java VM throws OutOfMemoryError for
         Unsafe.allocateMemory(-1L).
         
         See log:
         
         #Exception in thread "main" java.lang.OutOfMemoryError
         # at sun.misc.Unsafe.allocateMemory(Native Method)
         # at serial.Unsafe.allocateMemory.allocmem001.run(allocmem001.java:58)
         # at serial.Unsafe.allocateMemory.allocmem001.main(allocmem001.java:13)
         

      2. 64-bit server java_g VM does not throw IllegalArgumentException
         for Unsafe.allocateMemory(-1L).
         
         See log:
         
         ## FAILURE 5.
         # Memory was allocated with negative size.
         
      3. 64-bit server java_g VM crashes after memory is allocated
         with negative size.
         
         See log:
         
         ### nof_mallocs = 1030, nof_frees = 95
         ### memory stomp: byte at 100106de7 after object 100106de8
         #### previous object (not sure if correct): 100106d48 (49 bytes)
         #### next object: 100106e28 (8 bytes)
         ##
         ## HotSpot Virtual Machine Error, Internal Error
         ## Please report this error at
         ## http://java.sun.com/cgi-bin/bugreport.cgi
         ##
         ## Fatal: memory stomping error
         ##
         ## Error ID: /net/mersparc.eng/usr/re/hotspot/hotspot1.4/ws/src/share/vm/runtime/os.cpp, 370 [
      Patched ]
         ##
         ## Problematic Thread: prio=5 tid=0x100125818 nid=0x1 runnable
         ##
         #Dumping core....
         

      This test passes fine on Linux, Solaris Sparc and Solaris Intel on
      32-bit merlin-b53 on both Server and Client VMs.

      The test belongs to the testbase_nsk testbase located at:

          /net/sqesvr.eng/export/vsn/VM/merlin/testbase/testbase_nsk

      To reproduce the failure please use 'doit.sh' script found
      in the directory:

          /net/sqesvr.eng/export/vsn/VM/GammaBase/Bugs/<this bug number>

      Use:
          sh doit.sh $JAVA_HOME

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

            bobv Bob Vandette (Inactive)
            latkinsunw Latkin Latkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: