# HG changeset patch # User mchung # Date 1450373961 28800 # Node ID 906d9513cabc45f1dbd8472ff22c23402f926502 # Parent 931408264ee82f50183d0127ff74aa7ff84fa7ff 8144553: java/lang/StackWalker/StackWalkTest.java and MultiThreadStackWalk.java fail with stack overflows Reviewed-by: dfuchs diff -r 931408264ee8 -r 906d9513cabc jdk/test/java/lang/StackWalker/MultiThreadStackWalk.java --- a/jdk/test/java/lang/StackWalker/MultiThreadStackWalk.java Wed Dec 16 14:45:21 2015 -0800 +++ b/jdk/test/java/lang/StackWalker/MultiThreadStackWalk.java Thu Dec 17 09:39:21 2015 -0800 @@ -328,7 +328,7 @@ public void run() { try { - Env env = runTest(test, 2000, 10); + Env env = runTest(test, 1000, 10); //waitWalkers(env); checkTest(env, test); } catch(Throwable t) { diff -r 931408264ee8 -r 906d9513cabc jdk/test/java/lang/StackWalker/StackWalkTest.java --- a/jdk/test/java/lang/StackWalker/StackWalkTest.java Wed Dec 16 14:45:21 2015 -0800 +++ b/jdk/test/java/lang/StackWalker/StackWalkTest.java Thu Dec 17 09:39:21 2015 -0800 @@ -236,6 +236,8 @@ if (didWalk) { throw new IllegalStateException("StackWalkTest already used"); } + // Test may run into StackOverflow when running in -Xcomp mode on deep stack + assert stackDepth <= 1000; assert markAt <= stackDepth : "markAt(" + markAt + ") > stackDepth(" + stackDepth + ")"; System.out.print("runTest(" + swOptions @@ -297,15 +299,15 @@ // Long stack, default maxDepth StackWalkTest swt; swt = new StackWalkTest(); - swt.runTest(StackWalkTest.class, "main", 2000, 10); + swt.runTest(StackWalkTest.class, "main", 1000, 10); // Long stack, matching maxDepth swt = new StackWalkTest(2000); - swt.runTest(StackWalkTest.class, "main", 2000, 10); + swt.runTest(StackWalkTest.class, "main", 1000, 10); // Long stack, maximum maxDepth swt = new StackWalkTest(Integer.MAX_VALUE); - swt.runTest(StackWalkTest.class, "main", 2000, 10); + swt.runTest(StackWalkTest.class, "main", 1000, 10); // // Single batch @@ -349,7 +351,7 @@ swt.runTest(StackWalkTest.class, "main", 80, 40); swt = new StackWalkTest(EnumSet.of(RETAIN_CLASS_REFERENCE), 50); - swt.runTest(StackWalkTest.class, "main", 2000, 1048); + swt.runTest(StackWalkTest.class, "main", 1000, 524); } } }