RFR: JDK-8298852: Use of uninitialized memory in MetadataFactory::free_metadata

Coleen Phillimore coleenp at openjdk.org
Thu Dec 15 13:11:06 UTC 2022


On Thu, 15 Dec 2022 10:19:05 GMT, Justin King <jcking at openjdk.org> wrote:

> Fix undefined behavior by shifting call to member function to before destructor is called. Upon the destructor being called, the contents of the object are considered uninitialized and reading them is undefined.

I saw you changed this but didn't realize why so didn't carry your change forward.
Thanks for fixing this.

I would like it backported to JDK 20 since that change was incomplete without this.  I think you can do that with slash backport jdk20 when this is reviewed.

I also think this is a trivial fix (not requiring 24 hrs).

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

Marked as reviewed by coleenp (Reviewer).

PR: https://git.openjdk.org/jdk/pull/11688


More information about the hotspot-runtime-dev mailing list