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

Symbol leak in prepend_host_package_name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b08

      Description

          // Create a symbol and update the anonymous class name.
          _class_name = SymbolTable::new_symbol(new_anon_name,
                                                (int)host_pkg_len + 1 + class_name_len,
                                                CHECK);

      This needs to decrement the refcount of the thing that was in _class_name. But that leads to the problem that the Symbol in class_name is incremented again in fill_instance_klass() -> set_name(). Ie the owner of the _class_name is not decremented when ~ClassFileParser is called. _class_name should have an increment_refcount in the constructor.

      IE. wherever Symbol* are stored, they need an increment refcount.

      Thanks to [~kbarrett] for finding this.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: