Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8181170

resolved_references array leaks for RedefineClasses

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 10
    • 9
    • hotspot
    • None
    • b23

      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.

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: