--- old/src/share/vm/prims/jvmtiRedefineClasses.cpp Tue Dec 16 21:49:01 2014 +++ new/src/share/vm/prims/jvmtiRedefineClasses.cpp Tue Dec 16 21:49:01 2014 @@ -1409,6 +1409,7 @@ ConstantPool* merge_cp_oop = ConstantPool::allocate(loader_data, merge_cp_length, + the_class->constants()->patched(), CHECK_(JVMTI_ERROR_OUT_OF_MEMORY)); MergeCPCleaner cp_cleaner(loader_data, merge_cp_oop); @@ -3119,7 +3120,8 @@ // scratch_cp is a merged constant pool and has enough space for a // worst case merge situation. We want to associate the minimum // sized constant pool with the klass to save space. - ConstantPool* cp = ConstantPool::allocate(loader_data, scratch_cp_length, CHECK); + ConstantPool* cp = ConstantPool::allocate(loader_data, scratch_cp_length, + scratch_cp->patched(), CHECK); constantPoolHandle smaller_cp(THREAD, cp); // preserve version() value in the smaller copy