https://bugs.kde.org/show_bug.cgi?id=373505

            Bug ID: 373505
           Summary: Crash in highlighting
           Product: kdevelop
           Version: git master
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: Language Support: CPP (Clang-based)
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: m...@flherne.uk
  Target Milestone: ---

Using recent-ish git (8aeb887da37b523eb40e28aadd8895e9009d4b6e), I got this
crash shortly after opening a session:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fa09c12052a in KDevelop::TypeSystem::create (this=0x7fa09d2ee5a0
<KDevelop::TypeSystem::self()::system>, data=0x7fa0484410ca) at
/home/flh/projects/kdevplatform/language/duchain/types/typeregister.cpp:27
27        return m_factories.value(data->typeClassId)->create(data);
[Current thread is 1 (Thread 0x7fa052917700 (LWP 1091))]
(gdb) bt full
#0  0x00007fa09c12052a in
KDevelop::TypeSystem::create(KDevelop::AbstractTypeData*) const
(this=0x7fa09d2ee5a0 <KDevelop::TypeSystem::self()::system>,
data=0x7fa0484410ca)
    at
/home/flh/projects/kdevplatform/language/duchain/types/typeregister.cpp:27
#1  0x00007fa09c121ca1 in KDevelop::TypeRepository::typeForIndex(unsigned int)
(index=408138) at
/home/flh/projects/kdevplatform/language/duchain/types/typerepository.cpp:127
#2  0x00007fa09c132d99 in KDevelop::IndexedType::abstractType() const
(this=0x7fa050867561) at
/home/flh/projects/kdevplatform/language/duchain/types/indexedtype.cpp:65
#3  0x00007fa09c08d5bb in KDevelop::Declaration::abstractType() const
(this=0x7fa04c5394a0) at
/home/flh/projects/kdevplatform/language/duchain/declaration.cpp:261
#4  0x00007fa09c0c3c10 in KDevelop::FunctionDeclaration::additionalIdentity()
const (this=0x7fa04c5394a0) at
/home/flh/projects/kdevplatform/language/duchain/functiondeclaration.cpp:87
#5  0x00007fa09c0d8da5 in
KDevelop::DeclarationId::getDeclaration(KDevelop::TopDUContext const*, bool)
const (this=0x2001798, top=0x1f91ce0, instantiateIfRequired=true)
    at /home/flh/projects/kdevplatform/language/duchain/declarationid.cpp:172
        decl = 0x7fa04c5394a0
        filter = 
         
{<KDevelop::ConvenientEmbeddedSetIterator<KDevelop::IndexedDeclaration,
KDevelop::IndexedDeclarationHandler>> =
{<KDevelop::ConstantConvenientEmbeddedSet<KDevelop::IndexedDeclaration,
KDevelop::IndexedDeclarationHandler>> = {m_data = 0x7fa054a46180, m_dataSize =
147, m_centralFreeItem = -1}, m_pos = 0}, boundStack =
{<QVarLengthArray<QPair<QPair<unsigned int, unsigned int>,
Utils::VirtualSetNode<KDevelop::IndexedTopDUContext,
KDevelop::IndexedTopDUContextIndexConversion,
KDevelop::RecursiveImportCacheRepository> >, 256>> = {a = 256, s = 4, ptr =
0x7fa052914b38, {array =
"\207\000\000\000\223\000\000\000\302ۂ\003\000\000\000\000u\000\000\000\207\000\000\000\344\367\202\003\000\000\000\000\061\000\000\000u\000\000\000\032\f\203\003\000\000\000\000\005\000\000\000\060\000\000\000\304\026\203\003\000\000\000\000\003\000\000\000\005\000\000\000|\036\203\003\000\000\000\000f\000\000\000g\000\000\000\362\001\203\003\000\000\000\000`\000\000\000a\000\000\000\222\003\203\003\000\000\000\000\071\000\000\000:\000\000\000\374\n\203\003\000\000\000\000\065\000\000\000\066\000\000\000J\v\203\003\000\000\000\000\360K\221R\240\177\000\000\000L\221R\240\177\000\000\212\365\031\234\240\177\000\000\000L\221R\240\177\000\000\060L\221R\240\177\000\000@\340\016\235\240\177\000\000\060L\221R\240\177\000\000@"...,
q_for_alignment_1 = 631360192647, q_for_alignment_2 =
3.1193338133859389e-312}}, <No data fields>}, m_rhs =
{<KDevelop::IndexedTopDUContextIndexConversion> = {<No data fields>},
m_setIndex = 98714}, m_match = 4, m_matchBound = 4, m_matchingTo = {m_index =
281}, m_noFiltering = false}
        id = {m_index = 226400, {dd = 0x7fa0484f4cd0, cd = 0x7fa0484f4cd0}}
        ret = 0x0
#6  0x00007fa09c06fd4c in
KDevelop::TopDUContext::usedDeclarationForIndex(unsigned int) const
(this=0x1f91ce0, declarationIndex=4) at
/home/flh/projects/kdevplatform/language/duchain/topducontext.cpp:1092
#7  0x00007fa09c1ae55e in
KDevelop::CodeHighlightingInstance::highlightDUChain(KDevelop::DUContext*,
QHash<KDevelop::Declaration*, unsigned int>, QVector<KDevelop::Declaration*>)
(this=0x7fa040003730, context=0x1f93ea0, colorsForDeclarations=...,
declarationsForColors=...) at
/home/flh/projects/kdevplatform/language/highlighting/codehighlighting.cpp:297
        decl = 0x7fa0547e6370
        color = 
              {cspec = QColor::Invalid, ct = {argb = {alpha = 65535, red = 0,
green = 0, blue = 0, pad = 0}, ahsv = {alpha = 65535, hue = 0, saturation = 0,
value = 0, pad = 0}, acmyk = {alpha = 65535, cyan = 0, magenta = 0, yellow = 0,
black = 0}, ahsl = {alpha = 65535, hue = 0, saturation = 0, lightness = 0, pad
= 0}, array = {65535, 0, 0, 0, 0}}}
        a = 112
        lock = {m_lock = 0x7fa09c8f01e0 <KDevelop::(anonymous
namespace)::Q_QGS_sdDUChainPrivate::innerFunction()::holder+32>, m_locked =
true, m_timeout = 0}
        top = 0x1f91ce0
        takeFreeColors = 
            {<QListSpecialMethods<KDevelop::Declaration*>> = {<No data
fields>}, {p = {static shared_null = {ref = {atomic = {_q_value =
{<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data
fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7fa09eefb2e0
<QListData::shared_null>}, d = 0x7fa09eefb2e0 <QListData::shared_null>}}
        children = {d = 0x28}
#8  0x00007fa09c1ae7c7 in
KDevelop::CodeHighlightingInstance::highlightDUChain(KDevelop::DUContext*,
QHash<KDevelop::Declaration*, unsigned int>, QVector<KDevelop::Declaration*>)
(this=0x7fa040003730, context=0x1f93de0, colorsForDeclarations=...,
declarationsForColors=...) at
/home/flh/projects/kdevplatform/language/highlighting/codehighlighting.cpp:314
        child = 0x1f93ea0
        _container_ = {c = {d = 0x1f93e70}, i = {i = 0x1f93e88}, e = {i =
0x1f93e90}, control = 1}
        lock = {m_lock = 0x7fa09c8f01e0 <KDevelop::(anonymous
namespace)::Q_QGS_sdDUChainPrivate::innerFunction()::holder+32>, m_locked =
false, m_timeout = 0}
        top = 0x1f91ce0
        takeFreeColors =
            {<QListSpecialMethods<KDevelop::Declaration*>> = {<No data
fields>}, {p = {static shared_null = {ref = {atomic = {_q_value =
{<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data
fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7fa09eefb2e0
<QListData::shared_null>}, d = 0x7fa09eefb2e0 <QListData::shared_null>}}
        children = {d = 0x1f93e70}
#9  0x00007fa09c1ae7c7 in
KDevelop::CodeHighlightingInstance::highlightDUChain(KDevelop::DUContext*,
QHash<KDevelop::Declaration*, unsigned int>, QVector<KDevelop::Declaration*>)
(this=0x7fa040003730, context=0x1f93d40, colorsForDeclarations=...,
declarationsForColors=...) at
/home/flh/projects/kdevplatform/language/highlighting/codehighlighting.cpp:314
        child = 0x1f93de0
        _container_ = {c = {d = 0x1f93db0}, i = {i = 0x1f93dc8}, e = {i =
0x1f93dd0}, control = 1}
        lock = {m_lock = 0x7fa09c8f01e0 <KDevelop::(anonymous
namespace)::Q_QGS_sdDUChainPrivate::innerFunction()::holder+32>, m_locked =
false, m_timeout = 0}
        top = 0x1f91ce0
        takeFreeColors =
            {<QListSpecialMethods<KDevelop::Declaration*>> = {<No data
fields>}, {p = {static shared_null = {ref = {atomic = {_q_value =
{<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data
fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7fa09eefb2e0
<QListData::shared_null>}, d = 0x7fa09eefb2e0 <QListData::shared_null>}}
        children = {d = 0x1f93db0}
#10 0x00007fa09c1ae7c7 in
KDevelop::CodeHighlightingInstance::highlightDUChain(KDevelop::DUContext*,
QHash<KDevelop::Declaration*, unsigned int>, QVector<KDevelop::Declaration*>)
(this=0x7fa040003730, context=0x1f91ce0, colorsForDeclarations=...,
declarationsForColors=...) at
/home/flh/projects/kdevplatform/language/highlighting/codehighlighting.cpp:314
        child = 0x1f93d40
---Type <return> to continue, or q <return> to quit---
        _container_ = {c = {d = 0x200d340}, i = {i = 0x200d458}, e = {i =
0x200d528}, control = 1}
        lock = {m_lock = 0x7fa09c8f01e0 <KDevelop::(anonymous
namespace)::Q_QGS_sdDUChainPrivate::innerFunction()::holder+32>, m_locked =
false, m_timeout = 0}
        top = 0x1f91ce0
        takeFreeColors =
            {<QListSpecialMethods<KDevelop::Declaration*>> = {<No data
fields>}, {p = {static shared_null = {ref = {atomic = {_q_value =
{<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data
fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7fa09eefb2e0
<QListData::shared_null>}, d = 0x7fa09eefb2e0 <QListData::shared_null>}}
        children = {d = 0x200d340}
#11 0x00007fa09c1adb52 in
KDevelop::CodeHighlightingInstance::highlightDUChain(KDevelop::TopDUContext*)
(this=0x7fa040003730, context=0x1f91ce0)
    at
/home/flh/projects/kdevplatform/language/highlighting/codehighlighting.cpp:212
#12 0x00007fa09c1ad823 in
KDevelop::CodeHighlighting::highlightDUChain(KDevelop::ReferencedTopDUContext)
(this=0x1a75230, context=...) at
/home/flh/projects/kdevplatform/language/highlighting/codehighlighting.cpp:193
        url = {m_index = 365400}
        urlLock = {m_url = {m_index = 365400}}
        lock = {m_lock = 0x7fa09c8f01e0 <KDevelop::(anonymous
namespace)::Q_QGS_sdDUChainPrivate::innerFunction()::holder+32>, m_locked =
false, m_timeout = 0}
        revision = 0
        __PRETTY_FUNCTION__ = "virtual void
KDevelop::CodeHighlighting::highlightDUChain(KDevelop::ReferencedTopDUContext)"
        instance = 0x7fa040003730
        highlighting = 0x43bfe38
#13 0x00007fa09bffe8b7 in KDevelop::ParseJob::highlightDUChain()
(this=0x4f78590) at
/home/flh/projects/kdevplatform/language/backgroundparser/parsejob.cpp:501
#14 0x00007fa09bffe5fe in
KDevelop::ParseJob::isUpdateRequired(KDevelop::IndexedString const&)
(this=0x4f78590, languageString=...) at
/home/flh/projects/kdevplatform/language/backgroundparser/parsejob.cpp:477
        file = @0x7fa040003370: {d = 0x1f9c3f0}
        _container_ =
          {c =
{<QListSpecialMethods<QExplicitlySharedDataPointer<KDevelop::ParsingEnvironmentFile>
>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value
= {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data
fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7fa040003360},
d = 0x7fa040003360}}, i = {i = 0x7fa040003370}, e = {i = 0x7fa040003378},
control = 1}
        lock = {m_lock = 0x7fa09c8f01e0 <KDevelop::(anonymous
namespace)::Q_QGS_sdDUChainPrivate::innerFunction()::holder+32>, m_locked =
false, m_timeout = 0}
        __PRETTY_FUNCTION__ = "bool KDevelop::ParseJob::isUpdateRequired(const
KDevelop::IndexedString&)"
#15 0x00007fa065e888e1 in
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>,
ThreadWeaver::Thread*) () at
/usr/local/lib64/plugins/kdevplatform/26/kdevclangsupport.so
#16 0x00007fa09b371586 in
ThreadWeaver::IdDecorator::run(QSharedPointer<ThreadWeaver::JobInterface>,
ThreadWeaver::Thread*) () at /usr/lib/libKF5ThreadWeaver.so.5
#17 0x00007fa09b371b88 in
ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&,
ThreadWeaver::Thread*) () at /usr/lib/libKF5ThreadWeaver.so.5
#18 0x00007fa09b370a9a in
ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&,
ThreadWeaver::Thread*) () at /usr/lib/libKF5ThreadWeaver.so.5
#19 0x00007fa09b370140 in ThreadWeaver::Thread::run() () at
/usr/lib/libKF5ThreadWeaver.so.5
#20 0x00007fa09ec73d78 in  () at /usr/lib/libQt5Core.so.5
#21 0x00007fa09538e454 in start_thread () at /usr/lib/libpthread.so.0
#22 0x00007fa09e06e7df in clone () at /usr/lib/libc.so.6

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to