mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +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
|
@ -154,10 +154,12 @@ void SharedHeap::process_strong_roots(bool activate_scope,
|
|||
if (!_process_strong_tasks->is_task_claimed(SH_PS_JNIHandles_oops_do))
|
||||
JNIHandles::oops_do(roots);
|
||||
// All threads execute this; the individual threads are task groups.
|
||||
CLDToOopClosure roots_from_clds(roots);
|
||||
CLDToOopClosure* roots_from_clds_p = (is_scavenging ? NULL : &roots_from_clds);
|
||||
if (ParallelGCThreads > 0) {
|
||||
Threads::possibly_parallel_oops_do(roots, code_roots);
|
||||
Threads::possibly_parallel_oops_do(roots, roots_from_clds_p ,code_roots);
|
||||
} else {
|
||||
Threads::oops_do(roots, code_roots);
|
||||
Threads::oops_do(roots, roots_from_clds_p, code_roots);
|
||||
}
|
||||
if (!_process_strong_tasks-> is_task_claimed(SH_PS_ObjectSynchronizer_oops_do))
|
||||
ObjectSynchronizer::oops_do(roots);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue