diff options
| author | Med Ismail Bennani <medismail.bennani@gmail.com> | 2021-11-10 16:43:19 +0000 |
|---|---|---|
| committer | Med Ismail Bennani <medismail.bennani@gmail.com> | 2021-11-10 16:43:19 +0000 |
| commit | ad0f7d3d4a0c7ceaa5878494b2ad673287ef6a76 (patch) | |
| tree | 072c9dbe8ef966fdbf9e41ebe755596c27a54c8c /lldb/source/Plugins/Process/scripted/ScriptedThread.cpp | |
| parent | 9aea27ac88c408d18120a768047cedd90d987e03 (diff) | |
[lldb] Fix Scripted ProcessLaunchInfo Argument nullptr deref
This patch adds a new `StructuredData::Dictionary` constructor that
takes a `StructuredData::ObjectSP` as an argument. This is used to pass
the opaque_ptr from the `SBStructuredData` used to initialize a
ScriptedProecss, to the `ProcessLaunchInfo` class.
This also updates `SBLaunchInfo::SetScriptedProcessDictionary` to
reflect the formentionned changes which solves the nullptr deref.
Differential Revision: https://reviews.llvm.org/D112107
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/source/Plugins/Process/scripted/ScriptedThread.cpp')
| -rw-r--r-- | lldb/source/Plugins/Process/scripted/ScriptedThread.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp b/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp index de1203300e4b..dbe9e5019ff8 100644 --- a/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp +++ b/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp @@ -55,7 +55,7 @@ ScriptedThread::ScriptedThread(ScriptedProcess &process, Status &error) StructuredData::GenericSP object_sp = scripted_thread_interface->CreatePluginObject( class_name->c_str(), exe_ctx, - process.m_scripted_process_info.GetDictionarySP()); + process.m_scripted_process_info.GetArgsSP()); if (!object_sp || !object_sp->IsValid()) { error.SetErrorString("Failed to create valid script object"); return; |
