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

Justin King jcking at openjdk.org
Thu Dec 15 10:26:54 UTC 2022


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.

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

Commit messages:
 - Use of uninitialized memory in MetadataFactory::free_metadata

Changes: https://git.openjdk.org/jdk/pull/11688/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11688&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8298852
  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/11688.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11688/head:pull/11688

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


More information about the hotspot-runtime-dev mailing list