Integrated: 8253079: DeterministicDump.java fails due to garbage in structure padding

Ioi Lam iklam at openjdk.java.net
Tue Sep 22 08:07:36 UTC 2020


On Sun, 20 Sep 2020 05:37:33 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> (EDITED) In product builds, when `PackageEntry` and `ModuleEntry` objects are allocated, the memory is not zeroed. As a
> result, the structure padding slots (such as the 32-bits after `BasicHashtableEntry::_hash`) may contain garbage values
> that are different on every run of `java -Xshare:dump`. As a result, `java -Xshare:dump` cannot reproduce deterministic
> result.  The fix is to clear the memory for the newly allocated `HashtableEntry` objects when `DumpSharedSpaces ==
> true`.

This pull request has now been integrated.

Changeset: 284bbf02
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/284bbf02
Stats:     7 lines in 3 files changed: 0 ins; 6 del; 1 mod

8253079: DeterministicDump.java fails due to garbage in structure padding

Reviewed-by: minqi, jiefu, shade

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

PR: https://git.openjdk.java.net/jdk/pull/267


More information about the hotspot-runtime-dev mailing list