Currently when we redefine a class, we do not free the resolved_references array for the old class.  This is found via scratch_class -> constants -> cpCache currently.   When scratch_class is no longer needed, ie no old methods are running anymore, the scratch_class is reclaimed via purge_previous_versions.
But the resolved_reference array is also a jobject handle in the ClassLoaderData which is how the GC reaches it. This reference is not cleared when scratch_class is reclaimed.
There is some GC reason why it is bad to clear out references in the ClassLoaderData::_handles block.
But the resolved_reference array is also a jobject handle in the ClassLoaderData which is how the GC reaches it. This reference is not cleared when scratch_class is reclaimed.
There is some GC reason why it is bad to clear out references in the ClassLoaderData::_handles block.
- relates to
- 
                    JDK-8173988 Unsafe usage of ClassLoaderData::_handles with CMS -           
- Closed
 
-