6980792: Crash "exception happened outside interpreter, nmethods and vtable stubs (1)"
authornever
Thu, 07 Oct 2010 21:40:55 -0700
changeset 6770 a67870aaedb3
parent 6758 2c14f9ec1cbf
child 6771 3f9a5f169070
6980792: Crash "exception happened outside interpreter, nmethods and vtable stubs (1)" Reviewed-by: kvn
hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp
hotspot/src/share/vm/opto/library_call.cpp
hotspot/src/share/vm/opto/loopTransform.cpp
hotspot/src/share/vm/opto/runtime.cpp
--- a/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp	Wed Oct 06 14:18:32 2010 -0700
+++ b/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp	Thu Oct 07 21:40:55 2010 -0700
@@ -2586,6 +2586,8 @@
     __ restore();
 #endif
 
+    assert_clean_int(O2_count, G1);     // Make sure 'count' is clean int.
+
 #ifdef ASSERT
     // caller guarantees that the arrays really are different
     // otherwise, we would have to make conjoint checks
@@ -2600,8 +2602,6 @@
     }
 #endif //ASSERT
 
-    assert_clean_int(O2_count, G1);     // Make sure 'count' is clean int.
-
     checkcast_copy_entry = __ pc();
     // caller can pass a 64-bit byte count here (from generic stub)
     BLOCK_COMMENT("Entry:");
--- a/hotspot/src/share/vm/opto/library_call.cpp	Wed Oct 06 14:18:32 2010 -0700
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Thu Oct 07 21:40:55 2010 -0700
@@ -4761,7 +4761,7 @@
       Node* cv = generate_checkcast_arraycopy(adr_type,
                                               dest_elem_klass,
                                               src, src_offset, dest, dest_offset,
-                                              copy_length);
+                                              ConvI2X(copy_length));
       if (cv == NULL)  cv = intcon(-1);  // failure (no stub available)
       checked_control = control();
       checked_i_o     = i_o();
@@ -5206,7 +5206,7 @@
   int sco_offset = Klass::super_check_offset_offset_in_bytes() + sizeof(oopDesc);
   Node* p3 = basic_plus_adr(dest_elem_klass, sco_offset);
   Node* n3 = new(C, 3) LoadINode(NULL, memory(p3), p3, _gvn.type(p3)->is_ptr());
-  Node* check_offset = _gvn.transform(n3);
+  Node* check_offset = ConvI2X(_gvn.transform(n3));
   Node* check_value  = dest_elem_klass;
 
   Node* src_start  = array_element_address(src,  src_offset,  T_OBJECT);
--- a/hotspot/src/share/vm/opto/loopTransform.cpp	Wed Oct 06 14:18:32 2010 -0700
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp	Thu Oct 07 21:40:55 2010 -0700
@@ -2684,7 +2684,14 @@
                                                       fill_name, TypeAryPtr::get_array_body_type(t));
   call->init_req(TypeFunc::Parms+0, from);
   call->init_req(TypeFunc::Parms+1, store_value);
+#ifdef _LP64
+  len = new (C, 2) ConvI2LNode(len);
+  _igvn.register_new_node_with_optimizer(len);
+#endif
   call->init_req(TypeFunc::Parms+2, len);
+#ifdef _LP64
+  call->init_req(TypeFunc::Parms+3, C->top());
+#endif
   call->init_req( TypeFunc::Control, head->init_control());
   call->init_req( TypeFunc::I_O    , C->top() )        ;   // does no i/o
   call->init_req( TypeFunc::Memory ,  mem_phi->in(LoopNode::EntryControl) );
--- a/hotspot/src/share/vm/opto/runtime.cpp	Wed Oct 06 14:18:32 2010 -0700
+++ b/hotspot/src/share/vm/opto/runtime.cpp	Thu Oct 07 21:40:55 2010 -0700
@@ -646,12 +646,14 @@
 
 
 const TypeFunc* OptoRuntime::array_fill_Type() {
-  // create input type (domain)
-  const Type** fields = TypeTuple::fields(3);
-  fields[TypeFunc::Parms+0] = TypePtr::NOTNULL;
-  fields[TypeFunc::Parms+1] = TypeInt::INT;
-  fields[TypeFunc::Parms+2] = TypeInt::INT;
-  const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms + 3, fields);
+  // create input type (domain): pointer, int, size_t
+  const Type** fields = TypeTuple::fields(3 LP64_ONLY( + 1));
+  int argp = TypeFunc::Parms;
+  fields[argp++] = TypePtr::NOTNULL;
+  fields[argp++] = TypeInt::INT;
+  fields[argp++] = TypeX_X;               // size in whatevers (size_t)
+  LP64_ONLY(fields[argp++] = Type::HALF); // other half of long length
+  const TypeTuple *domain = TypeTuple::make(argp, fields);
 
   // create result type
   fields = TypeTuple::fields(1);