mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8022836: JVM crashes in JVMTIENVBASE::GET_CURRENT_CONTENDED_MONITOR and GET_OWNED_MONITOR
Check that the _java_thread parameter is valid when it is possible that the JavaThread has exited after the initial checks were made in generated/jvmtifiles/jvmtiEnter.cpp: jvmti_GetCurrentContendedMonitor() Reviewed-by: dcubed, dsamersoff
This commit is contained in:
parent
876967ae1f
commit
c5c705217b
1 changed files with 5 additions and 1 deletions
|
@ -406,7 +406,11 @@ public:
|
|||
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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue