RFR: 8031686: G1: assert(_hrs.max_length() == _expansion_regions) failed
Stefan Johansson
stefan.johansson at oracle.com
Thu Jan 16 13:43:15 UTC 2014
Hi,
Please review this small fix for:
https://bugs.openjdk.java.net/browse/JDK-8031686
Webrev:
http://cr.openjdk.java.net/~sjohanss/8031686/webrev.00/
Summary:
The failing assertion is caused by an erroneous calculation done when
setting up the regions array in HeapRegionSeq. When using a large heap a
pointer calculation will overflow (since ptrdiff_t is signed) and this
will in turn lead to the regions array being created longer that it
should be. For non debug builds this will lead to increased memory usage
and jmap will report a faulty value for the number of regions. The fix
is to use the pointer_delta-function to do the calculation.
Note: The bug is currently targeted for 8 but is defer-requested and
should be moved to 9 shortly. I plan to fix it in 9 and backport it to 8u20.
Testing:
* Manually verified that we are able to start 32-bit VMs with more than
2g of heap using a debug build.
Thanks,
Stefan
More information about the hotspot-gc-dev
mailing list