Refix Symbol leak in prepend_host_package_name

XMLWordPrintable

    • b08

      ------------------------------------------------------------------------------
      src/hotspot/share/classfile/classFileParser.cpp

      5778 Symbol* new_name = SymbolTable::new_symbol(new_anon_name,
      5779 (int)host_pkg_len + 1 + class_name_len,
      5780 CHECK);
      5781 update_class_name(new_name);

      I think calling update_class_name here is not right. new_symbol
      returns a Symbol with an incremented refcount. update_class_name will
      increment it again. The destructor change will decrement it, but only
      once (of course). So it picked up an extra count in the process.

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

              Created:
              Updated:
              Resolved: