mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8073735: compiler/loopopts/CountedLoopProblem.java got OOME
Ignore OOM in the test Reviewed-by: kvn
This commit is contained in:
parent
24be5c951c
commit
14cf940405
1 changed files with 16 additions and 12 deletions
|
@ -36,6 +36,7 @@ public class CountedLoopProblem {
|
|||
public static void main(String[] args) throws Exception {
|
||||
Random r = new Random(42);
|
||||
int x = 0;
|
||||
try {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(int i = 0; i < 1000000; ++i) {
|
||||
int v = Math.abs(r.nextInt());
|
||||
|
@ -49,6 +50,9 @@ public class CountedLoopProblem {
|
|||
if (sb.toString().hashCode() != 0xaba94591) {
|
||||
throw new Exception("Unexpected result");
|
||||
}
|
||||
} catch(OutOfMemoryError e) {
|
||||
// small heap, ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue