Integrated: 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:10 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` [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
This pull request has now been integrated.
Changeset: 3a4a94e5
Author: Jie Fu <jiefu at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/3a4a94e5a830c4e88ac12619b868f3d89aa416a5
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
8277854: The upper bound of GCCardSizeInBytes should be limited to 512 for 32-bit platforms
Reviewed-by: tschatzl, mli
-------------
PR: https://git.openjdk.java.net/jdk/pull/6569
More information about the hotspot-gc-dev
mailing list