7086560: 7085404 changes broke VM with -XX:-EnableInvokeDynamic
authorkvn
Sat, 03 Sep 2011 14:03:54 -0700
changeset 10516 2797e487c09f
parent 10515 fbe5731b1fc9
child 10517 f92c9ff3a15f
7086560: 7085404 changes broke VM with -XX:-EnableInvokeDynamic Summary: Add check that ciEnv::_CallSite_klass is initialized. Reviewed-by: jrose
hotspot/src/share/vm/ci/ciField.hpp
--- a/hotspot/src/share/vm/ci/ciField.hpp	Sat Sep 03 09:56:57 2011 -0700
+++ b/hotspot/src/share/vm/ci/ciField.hpp	Sat Sep 03 14:03:54 2011 -0700
@@ -176,7 +176,10 @@
   bool is_transient   () { return flags().is_transient(); }
 
   bool is_call_site_target() {
-    return (holder()->is_subclass_of(CURRENT_ENV->CallSite_klass()) && (name() == ciSymbol::target_name()));
+    ciInstanceKlass* callsite_klass = CURRENT_ENV->CallSite_klass();
+    if (callsite_klass == NULL)
+      return false;
+    return (holder()->is_subclass_of(callsite_klass) && (name() == ciSymbol::target_name()));
   }
 
   // Debugging output