# HG changeset patch # User coleenp # Date 1292357452 18000 # Node ID e44c68293be8898b0167f497c058beb384b16a8b # Parent d226d0eb0ff2a81ad06ee474c6bf8c7f0850f700 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 diff -r d226d0eb0ff2 -r e44c68293be8 hotspot/src/share/vm/oops/instanceRefKlass.cpp --- 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); }