mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
7006471: fix for 6988439 crashes when pending list lock is null
Missing null check in owns_pending_list_lock() because this can be called before pending_list_lock is initialized. Reviewed-by: never, kvn
This commit is contained in:
parent
d2481f01f0
commit
18324204ef
1 changed files with 1 additions and 0 deletions
|
@ -458,6 +458,7 @@ void instanceRefKlass::oop_verify_on(oop obj, outputStream* st) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool instanceRefKlass::owns_pending_list_lock(JavaThread* thread) {
|
bool instanceRefKlass::owns_pending_list_lock(JavaThread* thread) {
|
||||||
|
if (java_lang_ref_Reference::pending_list_lock() == NULL) return false;
|
||||||
Handle h_lock(thread, java_lang_ref_Reference::pending_list_lock());
|
Handle h_lock(thread, java_lang_ref_Reference::pending_list_lock());
|
||||||
return ObjectSynchronizer::current_thread_holds_lock(thread, h_lock);
|
return ObjectSynchronizer::current_thread_holds_lock(thread, h_lock);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue