7006471: fix for 6988439 crashes when pending list lock is null
Summary: missing null check in owns_pending_list_lock() because this can be called before pending_list_lock is initialized.
Reviewed-by: never, kvn
--- a/hotspot/src/share/vm/oops/instanceRefKlass.cpp Mon Dec 13 14:46:51 2010 -0800
+++ b/hotspot/src/share/vm/oops/instanceRefKlass.cpp Tue Dec 14 15:10:52 2010 -0500
@@ -458,6 +458,7 @@
}
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);
}