mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-12-06 06:41:18 +00:00
Fix an issue where certain CommandObjects (or Options thereof) were being created once, bound to a specific CommandInterpreter (and hence a specific Debugger), and then cached for reuse across different Debugger instances
Obviously, if the original Debugger goes away, those commands are holding on to now stale memory, which has the potential to cause crashes Fixes rdar://24460882 llvm-svn: 259964
This commit is contained in:
1 parent
304ccee528
commit
0a66e2f135
5 files changed
+79
-29
No files matched your search
+1
-6
@@ -4167,12 +4167,7 @@ RenderScriptRuntime::RenderScriptRuntime(Process *process)
|
||||
lldb::CommandObjectSP
|
||||
RenderScriptRuntime::GetCommandObject(lldb_private::CommandInterpreter &interpreter)
|
||||
{
|
||||
static CommandObjectSP command_object;
|
||||
if (!command_object)
|
||||
{
|
||||
command_object.reset(new CommandObjectRenderScriptRuntime(interpreter));
|
||||
}
|
||||
return command_object;
|
||||
return CommandObjectSP(new CommandObjectRenderScriptRuntime(interpreter));
|
||||
}
|
||||
|
||||
RenderScriptRuntime::~RenderScriptRuntime() = default;
|
||||
Reference in new issue
Block a user