java/util/Base64/TestEncodingDecodingLength.java currently requests -Xmx6g, which is above the max representable memory for 32-bit VM. The test allocates byte[Integer.MAX_VALUE - C], which means we cannot trim the heap size. Therefore, we have to disable the test on 32-bit.
Like this:
diff -r 35cb5d1c5881 test/jdk/java/util/Base64/TestEncodingDecodingLength.java
--- a/test/jdk/java/util/Base64/TestEncodingDecodingLength.java Tue Mar 26 22:29:54 2019 +0100
+++ b/test/jdk/java/util/Base64/TestEncodingDecodingLength.java Tue Mar 26 23:57:45 2019 +0100
@@ -28,11 +28,11 @@
/**
* @test
* @bug 8210583 8217969 8218265
* @summary Tests Base64.Encoder.encode and Base64.Decoder.decode
* with the large size of input array/buffer
- * @requires os.maxMemory >= 10g
+ * @requires (sun.arch.data.model == "64" & os.maxMemory >= 10g)
* @run main/othervm -Xms6g -Xmx8g TestEncodingDecodingLength
*
*/
public class TestEncodingDecodingLength {
Like this:
diff -r 35cb5d1c5881 test/jdk/java/util/Base64/TestEncodingDecodingLength.java
--- a/test/jdk/java/util/Base64/TestEncodingDecodingLength.java Tue Mar 26 22:29:54 2019 +0100
+++ b/test/jdk/java/util/Base64/TestEncodingDecodingLength.java Tue Mar 26 23:57:45 2019 +0100
@@ -28,11 +28,11 @@
/**
* @test
* @bug 8210583 8217969 8218265
* @summary Tests Base64.Encoder.encode and Base64.Decoder.decode
* with the large size of input array/buffer
- * @requires os.maxMemory >= 10g
+ * @requires (sun.arch.data.model == "64" & os.maxMemory >= 10g)
* @run main/othervm -Xms6g -Xmx8g TestEncodingDecodingLength
*
*/
public class TestEncodingDecodingLength {