RFR: 8330027: Identity hashes of archived objects must be based on a reproducible random seed
Calvin Cheung
ccheung at openjdk.org
Tue Apr 16 19:45:43 UTC 2024
On Thu, 11 Apr 2024 09:24:16 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> CDS archive contains archived objects with identity hashes.
>
> These hashes are deliberately preserved or even generated during dumping. They are generated based on a seed that is initialized randomly on a per-thread basis. These generations precede CDS dump initialization, so they are not affected by the init_random call there, nor would they be affected by [JDK-8323900](https://bugs.openjdk.org/browse/JDK-8323900).
>
> A random seed will not work for dumping archives since it prevents reproducible archive generation. Therefore, when dumping, these seeds must be initiated in a reproducible way.
Looks good.
nit: please update copyright header in thread.hpp.
-------------
Marked as reviewed by ccheung (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18735#pullrequestreview-2004471274
More information about the hotspot-runtime-dev
mailing list