2021-02-02 11:40:07 +08:00
|
|
|
From e546db5e9c81fabace719417cc77154e08355005 Mon Sep 17 00:00:00 2001
|
|
|
|
|
Date: Fri, 22 Jan 2021 11:37:38 +0800
|
|
|
|
|
Subject: Backport of JDK-8131600
|
2020-01-20 12:09:52 +08:00
|
|
|
|
|
|
|
|
Summary: JVM crashes when doing heapdump and handling a signal at a same time
|
|
|
|
|
LLT: none
|
|
|
|
|
|
|
|
|
|
Bug url: https://bugs.openjdk.java.net/browse/JDK-8131600
|
|
|
|
|
---
|
|
|
|
|
hotspot/src/share/vm/prims/jvmtiTagMap.cpp | 2 +-
|
|
|
|
|
hotspot/src/share/vm/services/heapDumper.cpp | 5 +++++
|
|
|
|
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
|
|
diff --git a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp
|
2021-02-02 11:40:07 +08:00
|
|
|
index 224cd21ad..dc600d8ea 100644
|
2020-01-20 12:09:52 +08:00
|
|
|
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp
|
|
|
|
|
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp
|
2021-02-02 11:40:07 +08:00
|
|
|
@@ -2829,7 +2829,7 @@ inline bool VM_HeapWalkOperation::iterate_over_class(oop java_class) {
|
2020-01-20 12:09:52 +08:00
|
|
|
if (klass->oop_is_instance()) {
|
|
|
|
|
InstanceKlass* ik = InstanceKlass::cast(klass);
|
|
|
|
|
|
|
|
|
|
- // ignore the class if it's has been initialized yet
|
|
|
|
|
+ // Ignore the class if it hasn't been initialized yet
|
|
|
|
|
if (!ik->is_linked()) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
diff --git a/hotspot/src/share/vm/services/heapDumper.cpp b/hotspot/src/share/vm/services/heapDumper.cpp
|
2021-02-02 11:40:07 +08:00
|
|
|
index e9fd8946a..24c0830c5 100644
|
2020-01-20 12:09:52 +08:00
|
|
|
--- a/hotspot/src/share/vm/services/heapDumper.cpp
|
|
|
|
|
+++ b/hotspot/src/share/vm/services/heapDumper.cpp
|
2021-02-02 11:40:07 +08:00
|
|
|
@@ -990,6 +990,11 @@ void DumperSupport::dump_class_and_array_classes(DumpWriter* writer, Klass* k) {
|
2020-01-20 12:09:52 +08:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // Ignore the class if it hasn't been initialized yet
|
|
|
|
|
+ if (!ik->is_linked()) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
writer->write_u1(HPROF_GC_CLASS_DUMP);
|
|
|
|
|
|
|
|
|
|
// class ID
|
|
|
|
|
--
|
2021-02-02 11:40:07 +08:00
|
|
|
2.19.0
|
2020-01-20 12:09:52 +08:00
|
|
|
|