8041683: Catch OutOfMemoryError in BitLengthOverflow and DoubleValueOverflow
Summary: java/math/BigInteger/BitLengthOverflow.java failing with OOME
Reviewed-by: alanb
--- a/jdk/test/java/math/BigInteger/BitLengthOverflow.java Tue Apr 29 14:37:02 2014 +0200
+++ b/jdk/test/java/math/BigInteger/BitLengthOverflow.java Tue Apr 29 09:42:16 2014 -0700
@@ -41,6 +41,10 @@
} catch (ArithmeticException e) {
// expected
System.out.println("Overflow is reported by ArithmeticException, as expected");
+ } catch (OutOfMemoryError e) {
+ // possible
+ System.err.println("BitLengthOverflow skipped: OutOfMemoryError");
+ System.err.println("Run jtreg with -javaoption:-Xmx8g");
}
}
}
--- a/jdk/test/java/math/BigInteger/DoubleValueOverflow.java Tue Apr 29 14:37:02 2014 +0200
+++ b/jdk/test/java/math/BigInteger/DoubleValueOverflow.java Tue Apr 29 09:42:16 2014 -0700
@@ -41,6 +41,10 @@
} catch (ArithmeticException e) {
// expected
System.out.println("Overflow is reported by ArithmeticException, as expected");
+ } catch (OutOfMemoryError e) {
+ // possible
+ System.err.println("DoubleValueOverflow skipped: OutOfMemoryError");
+ System.err.println("Run jtreg with -javaoption:-Xmx8g");
}
}
}