RFR: 8341015: OopStorage location decoder crashes accessing non-initalized OopStorage

Aleksey Shipilev shade at openjdk.org
Thu Sep 26 11:43:06 UTC 2024


When debugging CDS, I asked for `os::print_location` before OopStorage was initialized, like an error handler would do. This is a fairly unusual situation, this is why we have not seen it before. Anyhow, we entered the new code added by [JDK-8340392](https://bugs.openjdk.org/browse/JDK-8340392), which crashed on `OopStorage` that was `nullptr`. I think we should null-check `OopStorage` before calling into it.

Additional testing:
 - [x] OopStorageSetTest still passing
 - [x] Verified the check is now passing in similar debugging session

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

Commit messages:
 - Fix

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

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


More information about the hotspot-gc-dev mailing list