harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vera Petrashkova (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4076) [drlvm] VM cashes instead of throwing OutOfMemoryError
Date Wed, 06 Jun 2007 14:26:26 GMT
[drlvm] VM cashes instead of throwing OutOfMemoryError 
-------------------------------------------------------

                 Key: HARMONY-4076
                 URL: https://issues.apache.org/jira/browse/HARMONY-4076
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: Windows
            Reporter: Vera Petrashkova
            Priority: Minor


The following test demonstrates than VM reports about "Out of Memory" but then it crashes
instead of throwing OutOfMemoryError
---------------------test.java--------------------------
import java.io.*;
public class test  {

    private static java.util.List list;

    private static int[] buffer;

    public static void main (String[] argv) {
        int t = new test().test();
        if (t == 104) {
            System.err.println("Test passed");
        } else {
            System.err.println("Test failed");
        }
    }
    public int test() {

        int objectSize = 1000;
        int bufSize = 15000;
        
        System.err.println("Padding memory...");
        buffer = new int[bufSize];
        list = new java.util.LinkedList();
        int i = 0;
        try {
            while (true) {
                list.add(new Object[objectSize]);
                list.add(new int[bufSize]);
                i += 2;
            }
        } catch (OutOfMemoryError e) {
            return 104;
        } catch (Throwable e) {
            System.err.println("Unexpected error: "+e);
            return 106;
        }
    }
}
---------------------------------------
Run this test
Output on RI:
================
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)

Padding memory...
Test passed

Tjis

Output on DRLVM:
==============
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
icensors, as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r544707, (Jun  6 2007), Windows/ia32/msvc 1310, release build
http://harmony.apache.org
Padding memory...
The GC did not provide gc_add_weak_root_set_entry()
Out of Memory!

This occures on jitrino and interpreter.

This bug causes the failures of the tests from Stress test suite (https://issues.apache.org/jira/browse/HARMONY-3536)
stress.org.apache.harmony.test.stress.jni.stack.StackTest2
stress.org.apache.harmony.test.stress.jni.stack.StackTest4
stress.org.apache.harmony.test.stress.jni.stack.StackTest6
stress.org.apache.harmony.test.stress.jni.stack.StackTest10
stress.org.apache.harmony.test.stress.jni.stack.StackTest12
stress.org.apache.harmony.test.stress.jni.stack.StackTest14


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message