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

resolved_references array leaks for RedefineClasses

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b23

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: