changeset 1938:b03e6b4c7c75

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
author coleenp
date Tue, 14 Dec 2010 15:10:52 -0500
parents 06ba96862949
children e7ad5f6f4d29 aa6e219afbf1 1e637defdda6 e0c969b97f66
files src/share/vm/oops/instanceRefKlass.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/oops/instanceRefKlass.cpp	Mon Dec 13 14:46:51 2010 -0800
+++ b/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);
 }