diff options
author | jeffreytan81 <jeffreytan@meta.com> | 2024-03-06 10:50:32 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 10:50:32 -0800 |
commit | 8bdddcf0bb5a40e6ce6cbf7fc6b7ce576e2b032d (patch) | |
tree | 99a7095eb3d11047bfa161d275191f211251505b /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 954f891af20d193f6a5f41d7ede6a9313a49cfc3 (diff) | |
download | llvm-8bdddcf0bb5a40e6ce6cbf7fc6b7ce576e2b032d.zip llvm-8bdddcf0bb5a40e6ce6cbf7fc6b7ce576e2b032d.tar.gz llvm-8bdddcf0bb5a40e6ce6cbf7fc6b7ce576e2b032d.tar.bz2 |
Fix lldb crash while handling concurrent vfork() (#81564)
We got user reporting lldb crash while the debuggee is calling vfork()
concurrently from multiple threads.
The crash happens because the current implementation can only handle
single vfork, vforkdone protocol transaction.
This diff fixes the crash by lldb-server storing forked debuggee's <pid,
tid> pair in jstopinfo which will be decoded by lldb client to create
StopInfoVFork for follow parent/child policy. Each StopInfoVFork will
later have a corresponding vforkdone packet. So the patch also changes
the `m_vfork_in_progress` to be reference counting based.
Two new test cases are added which crash/assert without the changes in
this patch.
---------
Co-authored-by: jeffreytan81 <jeffreytan@fb.com>
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions