[crac] RFR: 8369566: CRaC: Record metrics during checkpoint [v4]
Timofei Pushkin
tpushkin at openjdk.org
Thu Oct 23 08:56:51 UTC 2025
On Thu, 23 Oct 2025 08:28:18 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:
>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update after review
>
> src/java.base/share/native/libcrexec/hashtable.hpp line 128:
>
>> 126: const unsigned int hash = string_hash(key) % _capacity;
>> 127: for (size_t i = hash; i < _capacity; i++) {
>> 128: if (strcmp(key, _keys[i]) == 0) {
>
> Since the number of keys can now be less than capacity, i.e. some stored keys may be uninitialized, we should check `_keys[i] != nullptr`
Actually, I don't remember whether `new[]` default-initializes to null or not. If not, we should do it ourselves.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/269#discussion_r2454337341
More information about the crac-dev
mailing list