8157592: StackTraceLogging fails with stack overflow on 32-bit Windows

Reviewed-by: coleenp, dholmes, jiangli
This commit is contained in:
George Triantafillou 2016-06-20 07:45:03 -04:00
parent 1d07931eae
commit 2e16218e6d
2 changed files with 3 additions and 8 deletions

View File

@ -39,15 +39,10 @@ import jdk.test.lib.OutputAnalyzer;
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);
}

View File

@ -38,7 +38,7 @@ public class TestThrowable {
// 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 {