summaryrefslogtreecommitdiff
path: root/src/common/x64/native_clock.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-09-29 16:19:37 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-09-30 02:53:34 -0300
commit771a9c21cc2f401cb9fd653cefcfe9da78b8f1a7 (patch)
tree13b3f85a3024a574606639c82d58ed1e83597332 /src/common/x64/native_clock.h
parent09609dd50ed862a7f1d00b704acbce5bff498994 (diff)
common/wall_clock: Add virtual destructors
From -fsanitize=address, this code wasn't calling the proper destructor. Adding virtual destructors for each inherited class and the base class fixes this bug. While we are at it, mark the functions as final.
Diffstat (limited to 'src/common/x64/native_clock.h')
-rw-r--r--src/common/x64/native_clock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/x64/native_clock.h b/src/common/x64/native_clock.h
index 891a3bbfd..7c503df26 100644
--- a/src/common/x64/native_clock.h
+++ b/src/common/x64/native_clock.h
@@ -12,7 +12,7 @@
namespace Common {
namespace X64 {
-class NativeClock : public WallClock {
+class NativeClock final : public WallClock {
public:
NativeClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency, u64 rtsc_frequency);