hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
changeset 38051 d092550d625d
parent 37475 0da78fa10d78
parent 38033 996ce936543f
child 38259 b495d1cfe673
--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp	Tue Apr 19 14:21:26 2016 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp	Tue Apr 19 15:26:59 2016 -0400
@@ -1449,12 +1449,12 @@
 
   ResourceMark rm(THREAD);
   _index_map_count = 0;
-  _index_map_p = new intArray(scratch_cp->length(), -1);
+  _index_map_p = new intArray(scratch_cp->length(), scratch_cp->length(), -1);
 
   _operands_cur_length = ConstantPool::operand_array_length(old_cp->operands());
   _operands_index_map_count = 0;
-  _operands_index_map_p = new intArray(
-    ConstantPool::operand_array_length(scratch_cp->operands()), -1);
+  int operands_index_map_len = ConstantPool::operand_array_length(scratch_cp->operands());
+  _operands_index_map_p = new intArray(operands_index_map_len, operands_index_map_len, -1);
 
   // reference to the cp holder is needed for copy_operands()
   merge_cp->set_pool_holder(scratch_class());