RFR: 8253079: DeterministicDump.java fails due to garbage in structure padding [v3]

Jie Fu jiefu at openjdk.java.net
Mon Sep 21 22:52:53 UTC 2020


On Mon, 21 Sep 2020 22:19:04 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`.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   also reset trace_id

Marked as reviewed by jiefu (Committer).

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

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


More information about the hotspot-runtime-dev mailing list