From a54fa62a3634ffdb65c49c9e18bf7f255292527e Mon Sep 17 00:00:00 2001
From: Derek Bruening <bruening@google.com>
Date: Thu, 3 Nov 2022 16:39:08 -0400
Subject: [PATCH] i#5538 memtrace seek, part 6: Virtualize
 raw2trace_thread_data

Adds a missing piece from part 5 PR #5713 where raw2trace's
thread_data_ was indirected to support a subclass extending it.
However, its destructor was not virtual, which prevented such
extension.  We address that here.

Issue: #5538
---
 clients/drcachesim/tracer/raw2trace.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/clients/drcachesim/tracer/raw2trace.h b/clients/drcachesim/tracer/raw2trace.h
index b60554f19..2488ffa6b 100644
--- a/clients/drcachesim/tracer/raw2trace.h
+++ b/clients/drcachesim/tracer/raw2trace.h
@@ -1878,6 +1878,10 @@ protected:
             , last_block_summary(nullptr)
         {
         }
+        // Support subclasses extending this struct.
+        virtual ~raw2trace_thread_data_t()
+        {
+        }
 
         int index;
         thread_id_t tid;
-- 
GitLab