diff options
author | Augusto Noronha <augusto2112@me.com> | 2023-08-15 15:57:36 -0700 |
---|---|---|
committer | Augusto Noronha <augusto2112@me.com> | 2023-08-18 16:53:26 -0700 |
commit | bb90063249707e3ae081bfbd8e3512566abb7df6 (patch) | |
tree | 842d30d0e6c69c4879d109e7485925c5b2e7f54c /clang/lib/ExtractAPI/DeclarationFragments.cpp | |
parent | 9c08e76f3e5f2f3e8cb1e3c9fd45827395c712cc (diff) | |
download | llvm-bb90063249707e3ae081bfbd8e3512566abb7df6.zip llvm-bb90063249707e3ae081bfbd8e3512566abb7df6.tar.gz llvm-bb90063249707e3ae081bfbd8e3512566abb7df6.tar.bz2 |
[lldb] Fix data race in ThreadList
ThreadSanitizer reports the following issue:
```
Write of size 8 at 0x00010a70abb0 by thread T3 (mutexes: write M0):
#0 lldb_private::ThreadList::Update(lldb_private::ThreadList&) ThreadList.cpp:741 (liblldb.18.0.0git.dylib:arm64+0x5dedf4) (BuildId: 9bced2aafa373580ae9d750d9cf79a8f32000000200000000100000000000e00)
#1 lldb_private::Process::UpdateThreadListIfNeeded() Process.cpp:1212 (liblldb.18.0.0git.dylib:arm64+0x53bbec) (BuildId: 9bced2aafa373580ae9d750d9cf79a8f32000000200000000100000000000e00)
Previous read of size 8 at 0x00010a70abb0 by main thread (mutexes: write M1):
#0 lldb_private::ThreadList::GetMutex() const ThreadList.cpp:785 (liblldb.18.0.0git.dylib:arm64+0x5df138) (BuildId: 9bced2aafa373580ae9d750d9cf79a8f32000000200000000100000000000e00)
#1 lldb_private::ThreadList::DidResume() ThreadList.cpp:656 (liblldb.18.0.0git.dylib:arm64+0x5de5c0) (BuildId: 9bced2aafa373580ae9d750d9cf79a8f32000000200000000100000000000e00)
#2 lldb_private::Process::PrivateResume() Process.cpp:3130 (liblldb.18.0.0git.dylib:arm64+0x53cd7c) (BuildId: 9bced2aafa373580ae9d750d9cf79a8f32000000200000000100000000000e00)
```
Fix this by only using the mutex in ThreadList and removing the one in
process entirely.
Differential Revision: https://reviews.llvm.org/D158034
Diffstat (limited to 'clang/lib/ExtractAPI/DeclarationFragments.cpp')
0 files changed, 0 insertions, 0 deletions