[Lldb-commits] [lldb] [lldb] Fix race/timeout in TestInternalThreadSuspension (PR #203202)
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 16 04:07:50 PDT 2026
================
@@ -16,7 +17,10 @@ function_to_call() {
void *
suspend_func (void *unused) {
pthread_setname_np("Look for me");
+ pthread_mutex_lock(&signal_mutex);
+ g_signaled = 1;
pthread_cond_signal(&signal_cond);
+ pthread_mutex_unlock(&signal_mutex);
----------------
Teemperor wrote:
pthread_cond_wait calls `pthread_mutex_lock(&signal_mutex);` internally after it wakes up, so without the unlock here its just a deterministic deadlock.
https://github.com/llvm/llvm-project/pull/203202
More information about the lldb-commits
mailing list