RFR: 8330027: Identity hashes of archived objects must be based on a reproducible random seed [v3]

Ioi Lam iklam at openjdk.org
Mon Apr 22 00:25:29 UTC 2024


On Fri, 19 Apr 2024 06:28:06 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> I get that the chance for this happening is remote, but hunting sources of entropy is frustrating work, and the patch is really very simple. So, why not fix it? I don't share the opinion that this is added complexity.

Why not do it inside `Thread::Thread()`


// thread-specific hashCode stream generator state - Marsaglia shift-xor form
  if (CDSConfig::is_dumping_static_archive()) {
     _hashStateX = 0;
  } else {
     _hashStateX = os::random();
  }

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

PR Comment: https://git.openjdk.org/jdk/pull/18735#issuecomment-2068284016


More information about the hotspot-runtime-dev mailing list