src/share/vm/memory/filemap.cpp

changeset 10008
fd3484fadbe3
parent 7414
0558eb13dcf3
child 10009
8adf45218add
     1.1 --- a/src/share/vm/memory/filemap.cpp	Sat Sep 12 00:09:03 2020 +0300
     1.2 +++ b/src/share/vm/memory/filemap.cpp	Wed Sep 23 15:18:53 2020 +0300
     1.3 @@ -125,13 +125,13 @@
     1.4    } else {
     1.5      // Get the hash value.  Use a static seed because the hash needs to return the same
     1.6      // value over multiple jvm invocations.
     1.7 -    unsigned int hash = AltHashing::murmur3_32(8191, (const jbyte*)vm_version, version_len);
     1.8 +    uint64_t hash = AltHashing::halfsiphash_64(8191, (const int8_t*)vm_version, version_len);
     1.9  
    1.10 -    // Truncate the ident, saving room for the 8 hex character hash value.
    1.11 -    strncpy(header_version, vm_version, JVM_IDENT_MAX-9);
    1.12 +    // Truncate the ident, saving room for the 16 hex character hash value.
    1.13 +    strncpy(header_version, vm_version, JVM_IDENT_MAX-17);
    1.14  
    1.15 -    // Append the hash code as eight hex digits.
    1.16 -    sprintf(&header_version[JVM_IDENT_MAX-9], "%08x", hash);
    1.17 +    // Append the hash code as 16 hex digits.
    1.18 +    sprintf(&header_version[JVM_IDENT_MAX-17], "%016" PRIx64, hash);
    1.19      header_version[JVM_IDENT_MAX-1] = 0;  // Null terminate.
    1.20    }
    1.21  }

mercurial