changeset 20056:7cf69d7bf8a6

Merge
author kevinw
date Wed, 18 Sep 2013 19:50:44 +0200
parents a12bd7991794 7281a3cb27f2
children 7131f20389fb
files
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp	Wed Sep 18 07:02:10 2013 -0700
+++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp	Wed Sep 18 19:50:44 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);
+    }
   }
 };