RFR: 8277854: The upper bound of GCCardSizeInBytes should be limited to 512 for 32-bit platforms

Jie Fu jiefu at openjdk.java.net
Mon Nov 29 23:20:09 UTC 2021


On Fri, 26 Nov 2021 09:18:03 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Hi all,
>> 
>> runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java crashes on linux/x86_32 with `-XX:GCCardSizeInBytes=1024`.
>> 
>> This is because if`-XX:GCCardSizeInBytes=1024` then `BOTConstants::N_words` [1] would be 256.
>> Then the guarantee [2] always fails due to _bot->offset_array(start_card), which is a u_char value, never equals to 256.
>> 
>> So for 32-bit platforms, the upper bound of `GCCardSizeInBytes` should be limited to 512.
>> 
>> Thanks.
>> Best regards,
>> Jie
>> 
>> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shared/blockOffsetTable.cpp#L45
>> [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp#L186
>
> Thanks for spotting this - that slipped past our testing (we do not do much 32 bit testing).
> 
>>>  Does a CSR needed?
>>
>> Maybe not since no VM flags are added or removed and jdk18 hasn't been released yet.
>> But I'm not sure.
> 
> I will talk to the CSR team whether there needs to be an amendment to the CSR for 32 bit platforms. please do not integrate before this has been handled.

> @tschatzl this pull request will not be integrated until the [CSR](https://wiki.openjdk.java.net/display/csr/Main) request [JDK-8277891](https://bugs.openjdk.java.net/browse/JDK-8277891) for issue [JDK-8277854](https://bugs.openjdk.java.net/browse/JDK-8277854) has been approved.

The CSR had been approved.
So integrate it.
Thanks.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6569


More information about the hotspot-gc-dev mailing list