[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 13 12:53:47 PST 2024
================
@@ -5681,7 +5684,10 @@ void ProcessGDBRemote::DidVForkDone() {
void ProcessGDBRemote::DidExec() {
// If we are following children, vfork is finished by exec (rather than
// vforkdone that is submitted for parent).
- if (GetFollowForkMode() == eFollowChild)
- m_vfork_in_progress = false;
+ if (GetFollowForkMode() == eFollowChild) {
+ if (m_vfork_in_progress > 0)
+ --m_vfork_in_progress;
+ assert(m_vfork_in_progress >= 0);
----------------
clayborg wrote:
This assert does nothing as you won't decrement it if it is not `> 0`. Remove
https://github.com/llvm/llvm-project/pull/81564
More information about the lldb-commits
mailing list