8131600: heapdump/JMapHeap EXCEPTION_ACCESS_VIOLATION
authorbrutisso
Thu, 23 Jul 2015 08:45:25 +0200
changeset 31974 869b4f9cbb40
parent 31973 11834746569e
child 31975 1e8d389159cb
child 31978 0f5334c83857
8131600: heapdump/JMapHeap EXCEPTION_ACCESS_VIOLATION Reviewed-by: mgerdin, kbarrett, tschatzl
hotspot/src/share/vm/prims/jvmtiTagMap.cpp
hotspot/src/share/vm/services/heapDumper.cpp
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Wed Jul 22 18:01:11 2015 +0000
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Thu Jul 23 08:45:25 2015 +0200
@@ -2824,7 +2824,7 @@
   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;
     }
--- a/hotspot/src/share/vm/services/heapDumper.cpp	Wed Jul 22 18:01:11 2015 +0000
+++ b/hotspot/src/share/vm/services/heapDumper.cpp	Thu Jul 23 08:45:25 2015 +0200
@@ -899,6 +899,11 @@
   assert(klass->oop_is_instance(), "not an InstanceKlass");
   InstanceKlass* ik = (InstanceKlass*)klass;
 
+  // Ignore the class if it hasn't been initialized yet
+  if (!ik->is_linked()) {
+    return;
+  }
+
   writer->write_u1(HPROF_GC_CLASS_DUMP);
 
   // class ID