[Lldb-commits] [lldb] 0de3d0c - [lldb][asan] Mark destructor as virtual to allow subclasses.
Jordan Rupprecht via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 20 09:25:09 PDT 2020
Author: Jordan Rupprecht
Date: 2020-08-20T09:21:33-07:00
New Revision: 0de3d0c61266675cd5e688a09e02124518e01935
URL: https://github.com/llvm/llvm-project/commit/0de3d0c61266675cd5e688a09e02124518e01935
DIFF: https://github.com/llvm/llvm-project/commit/0de3d0c61266675cd5e688a09e02124518e01935.diff
LOG: [lldb][asan] Mark destructor as virtual to allow subclasses.
`lldb_private::ScriptInterpreterPython::CommandDataPython` inherits from `lldb_private::BreakpointOptions::CommandData`, but the latter does not have a virtual destructor. This leads to a new-delete-type-mismatch error when running certain tests (such as `functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py`) under asan.
Added:
Modified:
lldb/include/lldb/Breakpoint/BreakpointOptions.h
Removed:
################################################################################
diff --git a/lldb/include/lldb/Breakpoint/BreakpointOptions.h b/lldb/include/lldb/Breakpoint/BreakpointOptions.h
index 615b4eb77be4..85b8e025a8e5 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointOptions.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointOptions.h
@@ -51,7 +51,7 @@ friend class Breakpoint;
: user_source(user_source), script_source(), interpreter(interp),
stop_on_error(true) {}
- ~CommandData() = default;
+ virtual ~CommandData() = default;
static const char *GetSerializationKey() { return "BKPTCMDData"; }
More information about the lldb-commits
mailing list