RFR: 8277854: The upper bound of GCCardSizeInBytes should be limited to 512 for 32-bit platforms
mli at openjdk.java.net
Sat Nov 27 00:51:08 UTC 2021
On Fri, 26 Nov 2021 06:29:45 GMT, Jie Fu <jiefu 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`  would be 256.
> Then the guarantee  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.
> Best regards,
>  https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shared/blockOffsetTable.cpp#L45
>  https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp#L186
Marked as reviewed by mli (Reviewer).
More information about the hotspot-gc-dev