Skip to content

Commit 86294c7

Browse files
fredrissJDevlieghere
authored andcommitted
Workaround a deadlock in the Swift REPL
This was already worked around in rdar://problem/38461035, but it was lost in a follow-up merge resolution. This reinstates the workaround and adds a test (from https://bugs.swift.org/browse/SR-7114) to make sure we don't regress this. apple-llvm-split-commit: ac73e28ffd7b156abbc6a9b3b62db0ba3b4c46f2 apple-llvm-split-dir: lldb/ (cherry picked from commit 510589b)
1 parent ee9e313 commit 86294c7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ void ManualDWARFIndex::Index() {
6767
// done indexing to make sure we don't pull in all DWARF dies, but we need
6868
// to wait until all units have been indexed in case a DIE in one
6969
// unit refers to another and the indexes accesses those DIEs.
70+
//
71+
// This call can deadlock because we are sometimes holding the module lock so
72+
// don't do it asynchronously.
7073
for (size_t i = 0; i < units_to_index.size(); ++i)
71-
pool.async(extract_fn, i);
72-
pool.wait();
74+
extract_fn(i);
7375

7476
// Now create a task runner that can index each DWARF unit in a
7577
// separate thread so we can index quickly.

0 commit comments

Comments
 (0)