[crac] RFR: 8370888: [CRaC] Use better source of random for UUID generation in checkpoint path

Timofei Pushkin tpushkin at openjdk.org
Thu Oct 30 12:05:17 UTC 2025


On Thu, 30 Oct 2025 11:38:54 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

> When `-XX:CRaCCheckpointTo` contains the `%u` placeholder to generate random UUID, it should use a different source than `os::random()` which provides not-seeded, deterministic values.

src/hotspot/os/posix/crac_posix.cpp line 63:

> 61:   for (size_t i = 0; i < length; i += sizeof(int)) {
> 62:     int value = os::next_random(seed);
> 63:     seed = value;

Is there a reason not to use `os::init_random` and `os::random`? It would be just a bit simpler.

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

PR Review Comment: https://git.openjdk.org/crac/pull/271#discussion_r2477845416


More information about the crac-dev mailing list