# HG changeset patch # User kevinw # Date 1379573266 -7200 # Node ID 7131f20389fb107d7c732e1f85f0e3208d47792a # Parent df02e3c7fcf97a2ac6dc77ed7b394b16c054a6d1# Parent 7cf69d7bf8a6a7db7810e0a808a4db0c3ef870e1 Merge diff -r df02e3c7fcf9 -r 7131f20389fb hotspot/src/share/vm/prims/jvmtiEnvBase.hpp --- 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); + } } };