From 18324204efecc27a1356b7a7abcca6624ceea960 Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Tue, 14 Dec 2010 15:10:52 -0500 Subject: [PATCH] 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 --- hotspot/src/share/vm/oops/instanceRefKlass.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/src/share/vm/oops/instanceRefKlass.cpp b/hotspot/src/share/vm/oops/instanceRefKlass.cpp index 2be6dbcfe2b..da2005dc778 100644 --- a/hotspot/src/share/vm/oops/instanceRefKlass.cpp +++ b/hotspot/src/share/vm/oops/instanceRefKlass.cpp @@ -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); }