harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r475258 - /incubator/harmony/enhanced/drlvm/trunk/vm/tests/smoke/StackTest.java
Date Wed, 15 Nov 2006 15:11:29 GMT
Author: gshimansky
Date: Wed Nov 15 07:11:28 2006
New Revision: 475258

URL: http://svn.apache.org/viewvc?view=rev&rev=475258
Log:
Applied HARMONY-2175 [drlvm] StackTest may hang Linux OS if there is no stack limit (e.g.
on x86_64)

Tests passed on win32 and ubuntu


Modified:
    incubator/harmony/enhanced/drlvm/trunk/vm/tests/smoke/StackTest.java

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/tests/smoke/StackTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/tests/smoke/StackTest.java?view=diff&rev=475258&r1=475257&r2=475258
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/tests/smoke/StackTest.java (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/tests/smoke/StackTest.java Wed Nov 15 07:11:28
2006
@@ -18,10 +18,12 @@
 public class StackTest {
 
     static int depth = 0;
+    static final int max_depth = 10000000;
 
     public static void func() {
         depth++;
-        func();
+	if (depth < max_depth)
+            func();
     }
 
     public static void main(String[] args) {
@@ -30,8 +32,8 @@
             System.out.println("FAIL");
         } catch (StackOverflowError soe) {
             System.out.println("PASS : First SOE depth = " + depth + " : " + soe);
-        } catch (Throwable th) {
-            System.out.println("FAIL");
+            return;
         }
+        System.out.println("FAIL: no SOE in " + max_depth + " iterations");
     }
 }



Mime
View raw message