6497639: 4/3 Profiling Swing application caused JVM crash

Make RedefineClasses() interoperate better with class sharing.

Reviewed-by: sspitsyn, jmasa
This commit is contained in:
Daniel D. Daugherty 2008-03-12 18:06:50 -07:00
parent 493ac9ee8f
commit 0f1d30354a
4 changed files with 87 additions and 27 deletions

View file

@ -155,8 +155,8 @@ bool Dictionary::do_unloading(BoolObjectClosure* is_alive) {
for (int i = ik->previous_versions()->length() - 1; i >= 0; i--) {
// check the previous versions array for GC'ed weak refs
PreviousVersionNode * pv_node = ik->previous_versions()->at(i);
jweak cp_ref = pv_node->prev_constant_pool();
assert(cp_ref != NULL, "weak cp ref was unexpectedly cleared");
jobject cp_ref = pv_node->prev_constant_pool();
assert(cp_ref != NULL, "cp ref was unexpectedly cleared");
if (cp_ref == NULL) {
delete pv_node;
ik->previous_versions()->remove_at(i);