src/hotspot/share/opto/parse2.cpp
changeset 48826 c4d9d1b08e2e
parent 47216 71c04702a3d5
child 48856 c866eaca24cb
--- a/src/hotspot/share/opto/parse2.cpp	Wed Jan 31 10:55:49 2018 -0800
+++ b/src/hotspot/share/opto/parse2.cpp	Fri Sep 08 10:46:46 2017 -0700
@@ -1483,8 +1483,9 @@
     // If the constant is unresolved, run this BC once in the interpreter.
     {
       ciConstant constant = iter().get_constant();
-      if (constant.basic_type() == T_OBJECT &&
-          !constant.as_object()->is_loaded()) {
+      if (!constant.is_valid() ||
+          (constant.basic_type() == T_OBJECT &&
+           !constant.as_object()->is_loaded())) {
         int index = iter().get_constant_pool_index();
         constantTag tag = iter().get_constant_pool_tag(index);
         uncommon_trap(Deoptimization::make_trap_request