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

os::SuspendedThreadTask causes references to global operator delete

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b03
    • CPU:
      generic
    • OS:
      generic

      Description

      The os::SuspendedThreadTask class is a base class with a virtual destructor. Because it has a virtual destructor and does not have an overriding definition for operator delete (either directly defined, or by inheriting from one of HotSpot's allocation base classes, neither of which it does), it's "deleting destructor" will refer to the global operator delete. That deleting destructor may be generated even if there are no calls to it. This reference to global operator delete prevents use of a link-time check for such to verify HotSpot code is not using the the C++ global heap.

      The simplest solution is probably to change the destructor from public and virtual to protected and non-virtual. That will work, so long as polymorphic deletion if derived objects is not required, and none of the existing uses need that.

      [Note: os::SuspendedThreadTask appears to only be used in code which is currently Oracle-closed.]

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: