Commit adc39d42 authored by Kevin Funk's avatar Kevin Funk
Browse files

Clang: Fix missing DUChain lock

```
Thread 1 (Thread 0x7fa4a716f940 (LWP 27455)):
[KCrash Handler]
6  __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:58
7  0x00007fa4c1e643ea in __GI_abort () at abort.c:89
8  0x00007fa4c315acc1 in qt_message_fatal (context=...,
message=<synthetic pointer>...) at global/qlogging.cpp:1648
9  QMessageLogger::fatal (this=this@entry=0x7ffd5b5a2520,
msg=msg@entry=0x7fa4c3410568 "ASSERT: \"%s\" in file %s, line %d") at
global/qlogging.cpp:790
10 0x00007fa4c315601e in qt_assert (assertion=<optimized out>,
file=<optimized out>, line=<optimized out>) at global/qglobal.cpp:2999
11 0x00007fa4be8a9396 in KDevelop::ParsingEnvironmentFile::importers
(this=0x60300153cac0) at
/home/kfunk/devel/src/kf5/kdevplatform-stable/language/duchain/parsingenvironment.cpp:196
12 0x00007fa4949435a1 in (anonymous
namespace)::findMatchingIncludeFiles (declarations=...) at
/home/kfunk/devel/src/kf5/kdevelop-stable/languages/clang/duchain/unknowndeclarationproblem.cpp:227
13 0x00007fa49493c3f6 in (anonymous namespace)::includeFiles
(identifier=..., declarations=..., file=...) at
/home/kfunk/devel/src/kf5/kdevelop-stable/languages/clang/duchain/unknowndeclarationproblem.cpp:324
14 0x00007fa494936e03 in (anonymous namespace)::fixUnknownDeclaration
(identifier=..., file=..., docrange=...) at
/home/kfunk/devel/src/kf5/kdevelop-stable/languages/clang/duchain/unknowndeclarationproblem.cpp:423
15 0x00007fa4949359bd in UnknownDeclarationProblem::solutionAssistant
(this=0x608000238520) at
/home/kfunk/devel/src/kf5/kdevelop-stable/languages/clang/duchain/unknowndeclarationproblem.cpp:477
```
parent 5f1e4974
......@@ -262,6 +262,8 @@ QVector<KDevelop::QualifiedIdentifier> findPossibleQualifiedIdentifiers( const Q
QStringList findMatchingIncludeFiles(const QVector<Declaration*> declarations)
{
DUChainReadLocker lock;
QStringList candidates;
for (const auto decl: declarations) {
// skip declarations that don't belong to us
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment