RFR  java/util/BitSet/BSMethods.java failed with: java.lang.OutOfMemoryError: Java heap space
ivan.gerasimov at oracle.com
Sun May 25 06:43:02 UTC 2014
There was a bug in BitSet.toString() fixed with JDK-8040806.
Unfortunately, the test that had come with this change started to fail
This is because it needs to create a BitSet with the bit
Integer.MAX_VALUE set, so this BitSet occupies 256M.
In particular, the test fails on 32-bit platforms.
The proposed fix for this is: First, run in othervm mode, so we're sure
that no other tests consume the heap space.
And second, explicitly check that VM is able to allocate enough memory.
Experiments showed that 380M seem to be the needed minimum, so I set the
boundary to 512M.
I've checked the updated test with JPRT on all available platforms, no
Would you please review the fix?
More information about the core-libs-dev