mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 12:34:32 +02:00
6814943: getcpool001 catches more than one JvmtiThreadState problem
Mark field volatile, use membars, and change access order to close race Reviewed-by: dcubed, dholmes
This commit is contained in:
parent
ae65c6240f
commit
6308eab4d5
4 changed files with 13 additions and 11 deletions
|
@ -667,14 +667,13 @@ void
|
|||
JvmtiEventControllerPrivate::thread_ended(JavaThread *thread) {
|
||||
// Removes the JvmtiThreadState associated with the specified thread.
|
||||
// May be called after all environments have been disposed.
|
||||
assert(JvmtiThreadState_lock->is_locked(), "sanity check");
|
||||
|
||||
EC_TRACE(("JVMTI [%s] # thread ended", JvmtiTrace::safe_get_thread_name(thread)));
|
||||
|
||||
JvmtiThreadState *state = thread->jvmti_thread_state();
|
||||
if (state != NULL) {
|
||||
MutexLocker mu(JvmtiThreadState_lock);
|
||||
delete state;
|
||||
}
|
||||
assert(state != NULL, "else why are we here?");
|
||||
delete state;
|
||||
}
|
||||
|
||||
void JvmtiEventControllerPrivate::set_event_callbacks(JvmtiEnvBase *env,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue