[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>
This commit is contained in:
@@ -106,7 +106,7 @@ ScriptedProcess::ScriptedProcess(
|
||||
|
||||
StructuredData::GenericSP object_sp = GetInterface().CreatePluginObject(
|
||||
m_scripted_process_info.GetClassName().c_str(), exe_ctx,
|
||||
m_scripted_process_info.GetDictionarySP());
|
||||
m_scripted_process_info.GetArgsSP());
|
||||
|
||||
if (!object_sp || !object_sp->IsValid()) {
|
||||
error.SetErrorStringWithFormat("ScriptedProcess::%s () - ERROR: %s",
|
||||
|
||||
Reference in New Issue
Block a user