[Lldb-commits] [lldb] [lldb] Unify thread detaching by making HostThreadPosix override Reset() (PR #179470)
Brian Cain via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 8 10:29:21 PDT 2026
androm3da wrote:
Could this PR (which landed quite a while ago) be related to recent premerge builder failures?
Speculating wildly....
In HostThreadPosix::Join()
1. pthread_join(m_thread) is called -- this consumes the thread handle
2. Then Reset() is called
3. Reset() sees IsJoinable() returns true (because m_thread hasn't been cleared yet)
4. It calls pthread_detach(m_thread) on an already-joined thread -- is this UB?
https://github.com/llvm/llvm-project/pull/179470
More information about the lldb-commits
mailing list