-
Bug
-
Resolution: Fixed
-
P5
-
2.0
-
fcs
-
x86
-
windows_nt
Name: szC45993 Date: 12/13/99
/net/sqesvr/vsn/testbase/testbase_nsk/src/nsk/arguments/args00124 test,
which uses developing options, crash java_g (java version "1.2.2"
Java HotSpot(TM) Server VM (2.0rc1, mixed mode, debug build I)) in -Xcomp mode
on WinNT (Pentium II, 350MHz, 128Mb RAM, Windows NT 4.0 Workstation).
See log and sources below.
LOG:
====
[#] cd d:/zss/TONGA_WSs/ZSS_workdir/Administrator.NT.x86/args00124
[#] f:/ld24/java/hotspot/jdk1.2.2/win32/bin/java_g -Xcomp -XX":"Flags=f:/ld24/java/zss/TONGA_WSs/testbase_js/src/nsk/arguments/args00124/gammarc.gammarc -verify args00124
...
java.lang.Class::forName0: native method (size: 9/0)
bcp: 0xc378bbc bci: 008 : areturn
MethodIterator [0-9]: {method} 'forName' '(Ljava/lang/String;)Ljava/lang/Class;' in 'java/lang/Class'
bcp: 0xc378bb4 bci: 000 : aload_0
bcp: 0xc378bb5 bci: 001 : iconst_1
bcp: 0xc378bb6 bci: 002 : invokestatic
bcp: 0xc378bb9 bci: 005 : invokestatic
bcp: 0xc378bbc bci: 008 : areturn
java.lang.Class.forName [Total compilation timeMerging state at bci:0 with empty state on path 1
Parsing block at bci:0 _ready:0, _reached:0, _looped:0
bci:0 preds:0
bci:1
bci:2
bci:5
bci:8
, 0.0268392 secs]
Marked for deoptimization
#
# HotSpot Virtual Machine Error, Internal Error
#
# Fatal: memory leak: allocating without ResourceMark
#
# Error ID: C:/hotspot\src\share\vm\memory\resourceArea.hpp, 49
#
[#]
SOURCES:
========
//--------------------- args00124.java:
//args00124.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 args00124
{
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);
}
}
//---------------------
#--------------------- gammarc.gammarc:
+TraceInvocationCounterOverflow
+TraceInlineCacheClearing
+TraceCarAllocation
+TraceDependencies
+TraceNewOopMapGeneration
+TraceOopMapRewrites
+TraceSafepoint
+TraceMethodIterator
+TraceICBuffer
+TraceCompiledIC
+TraceZapDeadLocals
+TraceOptoParse
+PrintSafepointStatistics
+PrintCHA
+TimeCompiler
+TimeCompiler2
+PrintInlining
+PrintMethodFlushing
+LogMultipleMutexLocking
#---------------------
======================================================================