6512830: Error: assert(tag_at(which).is_unresolved_klass(), "Corrupted constant pool")

Redefine classes copies the constant pool while the constant pool may be resolving strings or classes

Reviewed-by: dcubed, dsamersoff, acorn
This commit is contained in:
Coleen Phillimore 2011-03-03 19:52:23 -05:00
parent c3805bc224
commit a411df237d
2 changed files with 20 additions and 4 deletions

View file

@ -1084,7 +1084,10 @@ bool VM_RedefineClasses::merge_constant_pools(constantPoolHandle old_cp,
jbyte old_tag = old_cp->tag_at(old_i).value();
switch (old_tag) {
case JVM_CONSTANT_Class:
case JVM_CONSTANT_UnresolvedClass:
// revert the copy to JVM_CONSTANT_UnresolvedClass
// May be resolving while calling this so do the same for
// JVM_CONSTANT_UnresolvedClass (klass_name_at() deals with transition)
(*merge_cp_p)->unresolved_klass_at_put(old_i,
old_cp->klass_name_at(old_i));
break;