RFR: 8031686: G1: assert(_hrs.max_length() == _expansion_regions) failed

Stefan Johansson stefan.johansson at oracle.com
Thu Jan 16 14:45:36 UTC 2014


On 2014-01-16 15:00, Thomas Schatzl wrote:
> Hi Stefan,
>
> On Thu, 2014-01-16 at 14:43 +0100, Stefan Johansson wrote:
>> 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.
> Looks good.
Thanks for the review Thomas,
Stefan
> Thanks for fixing this,
> Thomas
>




More information about the hotspot-gc-dev mailing list