mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
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:
parent
2e2b69e96b
commit
3c2f3a321a
18 changed files with 327 additions and 42 deletions
|
@ -135,6 +135,20 @@ class KlassToOopClosure : public KlassClosure {
|
|||
virtual void do_klass(Klass* k);
|
||||
};
|
||||
|
||||
class CLDToOopClosure {
|
||||
OopClosure* _oop_closure;
|
||||
KlassToOopClosure _klass_closure;
|
||||
bool _must_claim_cld;
|
||||
|
||||
public:
|
||||
CLDToOopClosure(OopClosure* oop_closure, bool must_claim_cld = true) :
|
||||
_oop_closure(oop_closure),
|
||||
_klass_closure(oop_closure),
|
||||
_must_claim_cld(must_claim_cld) {}
|
||||
|
||||
void do_cld(ClassLoaderData* cld);
|
||||
};
|
||||
|
||||
// ObjectClosure is used for iterating through an object space
|
||||
|
||||
class ObjectClosure : public Closure {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue