8003720: NPG: Method in interpreter stack frame can be deallocated

Pass down a closure during root scanning to keep the class of the method alive.

Reviewed-by: coleenp, jcoomes
This commit is contained in:
Stefan Karlsson 2012-11-27 10:13:20 +01:00
parent 2e2b69e96b
commit 3c2f3a321a
18 changed files with 327 additions and 42 deletions

View file

@ -30,6 +30,10 @@ void KlassToOopClosure::do_klass(Klass* k) {
k->oops_do(_oop_closure);
}
void CLDToOopClosure::do_cld(ClassLoaderData* cld) {
cld->oops_do(_oop_closure, &_klass_closure, _must_claim_cld);
}
void ObjectToOopClosure::do_object(oop obj) {
obj->oop_iterate(_cl);
}