diff options
author | Med Ismail Bennani <ismail@bennani.ma> | 2023-11-08 17:18:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-08 17:18:40 -0800 |
commit | 0adbde65414af263175fcce6f9aaf51bc8849a9f (patch) | |
tree | 2a48fd7a139e8f798c003ae5adad160b97b0168b /llvm/lib/Bitcode/Writer | |
parent | f175b9647ccdfd67300264b2d3bd76e6f9a3fb93 (diff) | |
download | llvm-0adbde65414af263175fcce6f9aaf51bc8849a9f.zip llvm-0adbde65414af263175fcce6f9aaf51bc8849a9f.tar.gz llvm-0adbde65414af263175fcce6f9aaf51bc8849a9f.tar.bz2 |
[lldb] Fix assert in ScriptedProcess destructor (#71744)
This patch should fix a test failure in
`Expr/TestIRMemoryMapWindows.test`:
https://lab.llvm.org/buildbot/#/builders/219/builds/6786
The problem here is that since 7991412 landed, all the
`ScriptInterpreter::CreateScripted*Interface` now return a `nullptr`
when using the base `ScriptInterpreter` instance, instead of
`ScriptInterpreterPython` for instance.
This nullptr is actually well handled in the various places where we
create a Scripted Interface, however, because of the way to instanciate
a process, the process plugin manager have to iterate over every process
plugin and call the `CreateInstance` static function that should
instanciate the right object.
So in the ScriptedProcess case, because we are getting a `nullptr` when
trying to create a `ScriptedProcessInterface`, we try to discard the
process object, which calls the Process destructor, which in turns calls
the `ScriptedProcess` plugin `IsAlive` method. That method will fire an
assertion if the scripted interface pointer is not allocated.
This patch address that issue by setting a flag when destroying the
ScriptedProcess object, and checks that flag when calling `IsAlive`.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
0 files changed, 0 insertions, 0 deletions