You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Xiao-Feng Li (JIRA)" <ji...@apache.org> on 2007/06/15 06:28:26 UTC
[jira] Commented: (HARMONY-4076) [drlvm][gc] VM cashes instead of
throwing OutOfMemoryError
[ https://issues.apache.org/jira/browse/HARMONY-4076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505028 ]
Xiao-Feng Li commented on HARMONY-4076:
---------------------------------------
The bug should have been fixed with the patch in HARMONY-4114. Please check.
> [drlvm][gc] 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
> Assignee: Xiao-Feng Li
>
> 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.