RFR: 8280743: HSDB "Monitor Cache Dump" command might throw NPE [v2]
Chris Plummer
cjplummer at openjdk.org
Mon Aug 21 21:26:11 UTC 2023
> ObjectMonitor.object() can be null so we need to defend against it. This bug was discovered by code inspection while working on [JDK-8280555](https://bugs.openjdk.org/browse/JDK-8280555). We have no test for this, and I'm not sure how to reproduce this with HSDB like the [JDK-8280555](https://bugs.openjdk.org/browse/JDK-8280555) test did. I did at least verify that the HSDB "Monitor Cache Dump" feature still works after this fix, although none of the monitors had a null object.
Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
Move fetching the Oop to inside the else block.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/15369/files
- new: https://git.openjdk.org/jdk/pull/15369/files/a3f3f0e9..410bce0c
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=15369&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=15369&range=00-01
Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/15369.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15369/head:pull/15369
PR: https://git.openjdk.org/jdk/pull/15369
More information about the serviceability-dev
mailing list