8358129: compiler/startup/StartupOutput.java runs into out of memory on Windows after JDK-8347406

Reviewed-by: shade
Backport-of: 534a8605e5f4d771be69426687b2188d5353c91e
This commit is contained in:
Damon Fenacci 2025-06-17 13:10:06 +00:00
parent 46cfc1e194
commit cc4e9716ac
2 changed files with 3 additions and 9 deletions

View File

@ -79,8 +79,6 @@ compiler/ciReplay/TestIncrementalInlining.java 8349191 generic-all
compiler/c2/TestVerifyConstraintCasts.java 8355574 generic-all
compiler/startup/StartupOutput.java 8358129 windows-all
#############################################################################
# :hotspot_gc

View File

@ -60,21 +60,17 @@ public class StartupOutput {
throw new Exception("VM crashed with exit code " + exitCode);
}
Process[] pr = new Process[200];
for (int i = 0; i < 200; i++) {
int initialCodeCacheSizeInKb = 800 + rand.nextInt(400);
int reservedCodeCacheSizeInKb = initialCodeCacheSizeInKb + rand.nextInt(200);
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:InitialCodeCacheSize=" + initialCodeCacheSizeInKb + "K", "-XX:ReservedCodeCacheSize=" + reservedCodeCacheSizeInKb + "k", "-version");
pr[i] = pb.start();
}
for (int i = 0; i < 200; i++) {
out = new OutputAnalyzer(pr[i]);
// The VM should not crash but will probably fail with a "CodeCache is full. Compiler has been disabled." message
out.stdoutShouldNotContain("# A fatal error");
out = new OutputAnalyzer(pb.start());
exitCode = out.getExitValue();
if (exitCode != 1 && exitCode != 0) {
throw new Exception("VM crashed with exit code " + exitCode);
}
// The VM should not crash but will probably fail with a "CodeCache is full. Compiler has been disabled." message
out.stdoutShouldNotContain("# A fatal error");
}
}
}