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.]
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.]
- relates to
-
JDK-8173070 Remove ValueObj class for allocation subclassing for runtime code
-
- Resolved
-