Page MenuHomePhabricator

[lldb/Plugins] Serialize ProcessLaunchInfo ScriptedProcess Dictionary

Authored by mib on Oct 19 2021, 4:24 PM.



This patch replaces the type of the ProcessLaunchInfo ScriptedProcess
Dictionary from a StructuredData pointer to be serialized in a string.

The reason behind this change is that the lifetime of the dictionary's
pointer could be managed by an actor other than the debugger (i.e. the
Python Interpreter). In some cases, this caused the dictionary's pointer
to point to corrupted memory, which can interfere with the good functionning
of Scripted Processes and Scripted Threads.

This patch also updates the related-code to take these changes into account.

Signed-off-by: Med Ismail Bennani <>

Diff Detail

Event Timeline

mib requested review of this revision.Oct 19 2021, 4:24 PM
mib created this revision.
JDevlieghere requested changes to this revision.Oct 22 2021, 1:17 PM

I'd like to understand what the actual problem is and whether it can be avoided before we use a workaround like this. We have different places where we use structured data to communicate between Python and LLDB. What's special about this use case? If we really do need the workaround it would be good to keep that information somewhere so that the next person doesn't have to go through the same process.

This revision now requires changes to proceed.Oct 22 2021, 1:17 PM