RFR: 8253079: DeterministicDump.java fails due to garbage in structure padding
Ioi Lam
iklam at openjdk.java.net
Mon Sep 21 05:25:54 UTC 2020
On Sun, 20 Sep 2020 22:43:43 GMT, Yumin Qi <minqi at openjdk.org> wrote:
> The implementation is quite complex, every derivatives from BasicHashTableEntry need to have a copy_from function to
> avoid such problem. Maybe a brutal one to avoid such padding issue for all cases is fill the object allocated in
> AllocateHeap with \0?
You're right. My original analysis was wrong: set_hash() didn't write garbage into the padding. Instead, the garbage
was there because AllocaHeap didn't initialize the new buffer in product builds.
I reverted the original fix. Instead, I added code to call memset() when allocating a new hashtable entry (but only
when DumpSharedSpaces is true).
-------------
PR: https://git.openjdk.java.net/jdk/pull/267
More information about the hotspot-runtime-dev
mailing list