java-11-openjdk/jdk8243210-npe_in_clhsdbscanoops.patch

24 lines
1011 B
Diff
Raw Normal View History

commit 9d15f3e6537bf7a5ba081b2a6b7339a601ab7ba5
Author: Thomas Stuefe <stuefe@openjdk.org>
Date: Mon Aug 7 18:13:43 2023 +0000
8243210: ClhsdbScanOops fails with NullPointerException in FileMapHeader.inCopiedVtableSpace
Reviewed-by: clanger
Backport-of: 7f634155b5c4b9f07ab73ceb4c6042ac10dad65e
diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/FileMapInfo.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/FileMapInfo.java
index 307598f47f..ef8258525d 100644
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/FileMapInfo.java
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/FileMapInfo.java
@@ -121,6 +121,9 @@ public class FileMapInfo {
}
public boolean inCopiedVtableSpace(Address vptrAddress) {
+ if (vptrAddress == null) {
+ return false;
+ }
if (vptrAddress.greaterThan(mdRegionBaseAddress) &&
vptrAddress.lessThanOrEqual(mdRegionEndAddress)) {
return true;