Merge
authorkevinw
Thu, 19 Sep 2013 08:47:46 +0200
changeset 20057 7131f20389fb
parent 20054 df02e3c7fcf9 (current diff)
parent 20056 7cf69d7bf8a6 (diff)
child 20058 fc8fd1c76fe2
child 20059 c26474fd5ac0
Merge
--- a/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp	Wed Sep 18 20:08:00 2013 -0400
+++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp	Thu Sep 19 08:47:46 2013 +0200
@@ -406,7 +406,11 @@
   VMOp_Type type() const { return VMOp_GetCurrentContendedMonitor; }
   jvmtiError result() { return _result; }
   void doit() {
-    _result = ((JvmtiEnvBase *)_env)->get_current_contended_monitor(_calling_thread,_java_thread,_owned_monitor_ptr);
+    _result = JVMTI_ERROR_THREAD_NOT_ALIVE;
+    if (Threads::includes(_java_thread) && !_java_thread->is_exiting() &&
+        _java_thread->threadObj() != NULL) {
+      _result = ((JvmtiEnvBase *)_env)->get_current_contended_monitor(_calling_thread,_java_thread,_owned_monitor_ptr);
+    }
   }
 };