diff options
author | Enrico Granata <egranata@apple.com> | 2016-02-06 00:43:07 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2016-02-06 00:43:07 +0000 |
commit | 0a66e2f13505f9cf9e8a37dc35cb68effedeb13d (patch) | |
tree | a7abb280a21486f8989846b770745f7611d86ab8 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | |
parent | 304ccee5285534369a79960152a767e7a18398e8 (diff) | |
download | bcm5719-llvm-0a66e2f13505f9cf9e8a37dc35cb68effedeb13d.tar.gz bcm5719-llvm-0a66e2f13505f9cf9e8a37dc35cb68effedeb13d.zip |
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
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp')
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index 138a59aef68..362c5411a16 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -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; |