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:
Coleen Phillimore 2010-12-14 15:10:52 -05:00
parent d2481f01f0
commit 18324204ef

View File

@ -458,6 +458,7 @@ void instanceRefKlass::oop_verify_on(oop obj, outputStream* st) {
}
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());
return ObjectSynchronizer::current_thread_holds_lock(thread, h_lock);
}