RFR: 8350636: Potential null-pointer dereference in MallocSiteTable::new_entry

Johan Sjölen jsjolen at openjdk.org
Tue Feb 25 09:46:06 UTC 2025


Hi,

This fixes a potential null pointer dereference in case of OOM. We return `nullptr` instead of `p` because I didn't feel like casting `p` from `void*` to `MallocSiteHashtableEntry*`.

I believe that this is a trivial PR, and I would appreciate it if a reviewer agrees!

Thanks,
Johan

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

Commit messages:
 - Check for null

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

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


More information about the hotspot-runtime-dev mailing list