8197789: os::SuspendedThreadTask causes references to global operator delete
Summary: make destructor non-virtual and protected
Reviewed-by: kbarrett
--- a/src/hotspot/share/runtime/os.hpp Wed Feb 14 13:29:45 2018 +0100
+++ b/src/hotspot/share/runtime/os.hpp Wed Feb 14 09:03:31 2018 -0500
@@ -909,11 +909,11 @@
class SuspendedThreadTask {
public:
SuspendedThreadTask(Thread* thread) : _thread(thread), _done(false) {}
- virtual ~SuspendedThreadTask() {}
void run();
bool is_done() { return _done; }
virtual void do_task(const SuspendedThreadTaskContext& context) = 0;
protected:
+ ~SuspendedThreadTask() {}
private:
void internal_do_task();
Thread* _thread;