[all-commits] [llvm/llvm-project] e82344: [lldb][debugserver] Synchronize interrupt and resu...
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Thu Mar 13 13:54:34 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e823449f66acb39ce5a11dde6283ffd11731fe6a
https://github.com/llvm/llvm-project/commit/e823449f66acb39ce5a11dde6283ffd11731fe6a
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2025-03-13 (Thu, 13 Mar 2025)
Changed paths:
M lldb/tools/debugserver/source/MacOSX/MachProcess.h
M lldb/tools/debugserver/source/MacOSX/MachProcess.mm
Log Message:
-----------
[lldb][debugserver] Synchronize interrupt and resume signals (#131073)
This PR fixes a race condition in debugserver where the main thread
calls MachProcess::Interrupt, setting `m_sent_interrupt_signo` while the
exception monitoring thread is checking the value of the variable.
I was on the fence between introducing a new mutex and reusing the
existing exception mutex. With the notable exception of
MachProcess::Interrupt, all the other places where we were already
locking this mutex before accessing the variable. I renamed the mutex to
make it clear that it's now protecting more than the exception messages.
Jason, while investigating a real issue, had a suspicion there was race
condition related to interrupts and I was able to narrow it down by
building debugserver with TSan.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list