RFR: 8366193: Add comments about ResolvedFieldEntry::copy_from()
Francesco Andreuzzi
duke at openjdk.org
Wed Aug 27 08:55:40 UTC 2025
On Tue, 26 Aug 2025 16:53:17 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> [JDK-8293980](https://bugs.openjdk.org/browse/JDK-8293980) added `ResolvedFieldEntry::copy_from()` to prevent random bits in the CDS archive. However, I forgot to add a comment to explain why this is necessary.
>
> This PR adds the missing comment, which will be useful if we consider alternative solutions (using `memset()` in constructor??) in the future.
Hi @iklam, thanks for following up on this. I was wondering, would it be possible to explicitly set padding fields with default value zero? Something like this:
u8 padding1;
#ifdef _LP64
u32 padding2;
#endif
so we could use the default constructor, like I'm doing in #26818.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26946#issuecomment-3227351623
More information about the hotspot-dev
mailing list