changeset 39397:ae63e0e7af71

8157592: StackTraceLogging fails with stack overflow on 32-bit Windows Reviewed-by: coleenp, dholmes, jiangli
author gtriantafill
date Mon, 20 Jun 2016 07:45:03 -0400
parents 84aae7f2f638
children 9f8d0683c90f
files hotspot/test/runtime/Throwable/StackTraceLogging.java hotspot/test/runtime/Throwable/TestThrowable.java
diffstat 2 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/test/runtime/Throwable/StackTraceLogging.java	Mon Jun 13 13:52:38 2016 +0200
+++ b/hotspot/test/runtime/Throwable/StackTraceLogging.java	Mon Jun 20 07:45:03 2016 -0400
@@ -39,15 +39,10 @@
 import jdk.test.lib.ProcessTools;
 
 public class StackTraceLogging {
-    static void updateEnvironment(ProcessBuilder pb, String environmentVariable, String value) {
-        Map<String, String> env = pb.environment();
-        env.put(environmentVariable, value);
-    }
-
     static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
-        // These depths match the ones in TestThrowable.java
-        int[] depths = {10, 34, 100, 1024};
+        // These depths match the ones in TestThrowable.java, except the one greater than 1024
+        int[] depths = {10, 34, 100, 1023, 1024};
         for (int d : depths) {
             output.shouldContain("java.lang.RuntimeException, " + d);
         }
--- a/hotspot/test/runtime/Throwable/TestThrowable.java	Mon Jun 13 13:52:38 2016 +0200
+++ b/hotspot/test/runtime/Throwable/TestThrowable.java	Mon Jun 20 07:45:03 2016 -0400
@@ -38,7 +38,7 @@
   // Inner class that throws a lot of exceptions
   static class Thrower {
     static int MaxJavaStackTraceDepth = 1024; // as above
-    int[] depths = {10, 34, 100, 1024, 2042};
+    int[] depths = {10, 34, 100, 1023, 1024, 1025};
     int count = 0;
 
     int getDepth(Throwable t) throws Exception {