[crac] RFR: 8375044: [CRaC] Structured engine options info [v4]
Timofei Pushkin
tpushkin at openjdk.org
Mon Jan 19 10:29:15 UTC 2026
On Mon, 19 Jan 2026 09:05:03 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:
>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix windows build
>
> src/hotspot/share/include/crlib/crlib_description.h line 41:
>
>> 39: CHECKPOINT = 1 << 0,
>> 40: RESTORE = 1 << 1,
>> 41: DEPRECATED = 1 << 2,
>
> The values should have globally unique names, like `CRLIB_CONF_OPTION_FLAG_CHECKPOINT`.
>
> E.g. we have `CRLIB_IMAGE_INFO_*` prefix for `crlib_image_info_parts_t` enum in the image info extension of Zulu.
We already have the same problem with `crlib_bitmap_comparison_t`...
> src/hotspot/share/include/crlib/crlib_description.h line 42:
>
>> 40: RESTORE = 1 << 1,
>> 41: DEPRECATED = 1 << 2,
>> 42: } crlib_conf_option_flag_t;
>
> There may be a problem with ABI compatibility if we'll add more values in the future. Since we do not fix an underlying type (we cannot as this is a C99 API) the compiler is free to choose any integer type not larger than int that can represent all listed values. I suggest adding an upper-bound value that will ensure that either int or unsigned int is the underlying type and only unsigned values are used (on popular data models): `MAX = 0x7FFFFFFF`. The value is not supposed to be actually used.
>
> Although maybe this is too paranoid.
If we choose to apply this, the same should be done for `crlib_bitmap_comparison_t`
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/286#discussion_r2703883123
PR Review Comment: https://git.openjdk.org/crac/pull/286#discussion_r2703893116
More information about the crac-dev
mailing list