https://bugs.kde.org/show_bug.cgi?id=451856
Bug ID: 451856 Summary: kdevelop crashes while parsing project, looks like a loop Product: kdevelop Version: 5.7.211203 Platform: openSUSE RPMs OS: Linux Status: REPORTED Severity: crash Priority: NOR Component: Analyzer: Clazy Assignee: kdevelop-bugs-n...@kde.org Reporter: aar...@doofus.org CC: an...@anikin.xyz, kosse...@kde.org Target Milestone: --- SUMMARY When I open my project and Kdevelop parses it, it's crashing while it attempts to parse the system Python files. In this case, it crashes when it hits /usr/lib64/python3.6/html/entities.py [New Thread 0x7fff7b554700 (LWP 18051)] [New Thread 0x7fff79d51700 (LWP 18054)] [New Thread 0x7fff840a6700 (LWP 18045)] [New Thread 0x7fff7c556700 (LWP 18049)] [New Thread 0x7fff7cd57700 (LWP 18048)] [New Thread 0x7fff830a4700 (LWP 18046)] [New Thread 0x7fff7ad53700 (LWP 18052)] [New Thread 0x7fff7a552700 (LWP 18053)] [New Thread 0x7fff7bd55700 (LWP 18050)] [New Thread 0x7fff838a5700 (LWP 18044)] [Thread 0x7fff7dd59700 (LWP 18042) exited] Thread 35 "Queue(0x5555562" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fff95995700 (LWP 13509)] 0x00007fff8e929ca8 in clang::ASTContext::getTypeInfoImpl (this=0x555561179310, T=<optimized out>) at ../tools/clang/include/clang/AST/Type.h:5641 5641 QualType desugar() const { return isSugared() ? Pattern : QualType(this, 0); } (gdb) bt #0 0x00007fff8e929ca8 in clang::ASTContext::getTypeInfoImpl (this=0x555561179310, T=<optimized out>) at ../tools/clang/include/clang/AST/Type.h:5641 #1 0x00007fff8e92b1bf in clang::ASTContext::getTypeInfo (this=0x555561179310, T=0x555566b206f0) at ../tools/clang/lib/AST/ASTContext.cpp:1867 #2 0x00007fff8ebb20a6 in clang::ASTContext::getTypeAlign (this=0x555561179310, T=0x7fff90fbc024) at ../tools/clang/include/clang/AST/ASTContext.h:2108 #3 clang::ASTContext::getTypeAlignInChars (this=0x555561179310, T=0x7fff90fbc024) at ../tools/clang/lib/AST/ASTContext.cpp:2380 #4 GetAlignOfType (Info=..., T=..., ExprKind=clang::UETT_AlignOf) at ../tools/clang/lib/AST/ExprConstant.cpp:8468 #5 0x00007fff8eb90a48 in (anonymous namespace)::IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr (this=0x7fff95991dc0, E=0x555566b20988) at ../tools/clang/lib/AST/ExprConstant.cpp:12524 #6 clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::IntExprEvaluator, bool>::Visit (this=0x7fff95991dc0, S=0x555566b20988) at tools/clang/include/clang/AST/StmtNodes.inc:1373 #7 0x00007fff8eb5d78c in Evaluate (Result=..., Info=..., E=0x555566b20988) at ../tools/clang/lib/AST/ExprConstant.cpp:13949 #8 0x00007fff8eb60d41 in EvaluateAsRValue (Info=..., E=0x555566b20988, Result=...) at ../tools/clang/lib/AST/ExprConstant.cpp:14057 #9 0x00007fff8eb607f7 in EvaluateAsRValue (E=0x555566b20988, Result=..., Ctx=..., Info=...) at ../tools/clang/lib/AST/ExprConstant.cpp:14114 #10 clang::Expr::EvaluateKnownConstInt (this=0x555566b20988, Ctx=..., Diag=<optimized out>) at ../tools/clang/lib/AST/ExprConstant.cpp:14363 #11 0x00007fff8ead0dfe in clang::AlignedAttr::getAlignment (this=0x555566a5e249, Ctx=...) at tools/clang/include/clang/AST/AttrImpl.inc:1522 #12 clang::Decl::getMaxAlignment (this=<optimized out>) at ../tools/clang/lib/AST/DeclBase.cpp:438 #13 0x00007fff8ed127e4 in (anonymous namespace)::ItaniumRecordLayoutBuilder::InitializeLayout (this=0x7fff95992568, D=0x555566b209a8) at ../tools/clang/lib/AST/RecordLayoutBuilder.cpp:1281 #14 0x00007fff8ed0a7b1 in (anonymous namespace)::ItaniumRecordLayoutBuilder::Layout (this=0x7fff95992568, RD=<optimized out>) at ../tools/clang/lib/AST/RecordLayoutBuilder.cpp:1314 #15 clang::ASTContext::getASTRecordLayout (this=<optimized out>, D=0x555566b209a8) at ../tools/clang/lib/AST/RecordLayoutBuilder.cpp:3084 #16 0x00007fff8e92a34d in clang::ASTContext::getTypeInfoImpl (this=0x555561179310, T=0x555566b20a40) at ../tools/clang/lib/AST/ASTContext.cpp:2234 #17 0x00007fff8e92b1bf in clang::ASTContext::getTypeInfo (this=0x555561179310, T=0x555566b20a40) at ../tools/clang/lib/AST/ASTContext.cpp:1867 #18 0x00007fff8e92b086 in clang::ASTContext::getTypeInfoInChars (this=0x555561179310, T=0x555566b20a40) at ../tools/clang/lib/AST/ASTContext.cpp:1819 #19 0x00007fff9162a0e5 in (anonymous namespace)::Visitor::setTypeSize (type=..., kdevType=kdevType@entry=0x5555692dc200, this=0x7fff95994400) at /usr/src/debug/kdevelop5-21.12.3-lp153.11.2.x86_64/plugins/clang/duchain/builder.cpp:927 #20 0x00007fff9163bffa in (anonymous namespace)::Visitor::createDeclaration<(CXCursorKind)2, KDevelop::ClassDeclaration> (context=0x5555691f5f20, id=..., cursor=..., this=0x7fff95994400) at /usr/src/debug/kdevelop5-21.12.3-lp153.11.2.x86_64/plugins/clang/duchain/builder.cpp:456 #21 (anonymous namespace)::Visitor::buildDeclaration<(CXCursorKind)2, KDevelop::ClassDeclaration, true> (cursor=..., this=0x7fff95994400) at /usr/src/debug/kdevelop5-21.12.3-lp153.11.2.x86_64/plugins/clang/duchain/builder.cpp:1211 #22 (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)2, (Decision)0, (Decision)0> (parent=..., cursor=..., this=0x7fff95994400) at /usr/src/debug/kdevelop5-21.12.3-lp153.11.2.x86_64/plugins/clang/duchain/builder.cpp:984 #23 (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)2, (Decision)0, (Decision)2> (this=0x7fff95994400, cursor=..., parent=...) at /usr/src/debug/kdevelop5-21.12.3-lp153.11.2.x86_64/plugins/clang/duchain/builder.cpp:958 #24 0x00007fff9164b60e in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)2> (parent=..., cursor=..., this=0x7fff95994400) at /usr/src/debug/kdevelop5-21.12.3-lp153.11.2.x86_64/plugins/clang/duchain/builder.cpp:946 #25 (anonymous namespace)::visitCursor (cursor=..., parent=..., data=0x7fff95994400) at /usr/src/debug/kdevelop5-21.12.3-lp153.11.2.x86_64/plugins/clang/duchain/builder.cpp:1550 #26 0x00007fff91c04690 in clang::cxcursor::CursorVisitor::Visit (this=0x7fff959941e0, Cursor=..., CheckedRegionOfInterest=true) at ../tools/clang/tools/libclang/CIndex.cpp:213 #27 clang::cxcursor::CursorVisitor::handleDeclForVisitation (this=0x7fff959941e0, D=0x555566b209a8) at ../tools/clang/tools/libclang/CIndex.cpp:675 #28 0x00007fff91c047c8 in clang::cxcursor::CursorVisitor::VisitDeclContext (this=0x7fff959941e0, DC=<optimized out>) at ../tools/clang/tools/libclang/CIndex.cpp:636 #29 0x00007fff91c00eef in clang::cxcursor::CursorVisitor::VisitChildren (this=0x7fff959941e0, Cursor=...) at ../tools/clang/tools/libclang/CIndex.cpp:536 #30 0x00007fff91c11696 in clang_visitChildren (parent=..., visitor=visitor@entry=0x7fff91649f00 <(anonymous namespace)::visitCursor(CXCursor, CXCursor, CXClientData)>, client_data=0x7fff90fbc024, client_data@entry=0x7fff95994400) at ../tools/clang/tools/libclang/CIndex.cpp:4500 #31 0x00007fff916313fe in (anonymous namespace)::Visitor::Visitor (update=<optimized out>, includes=..., file=<optimized out>, tu=<optimized out>, this=0x7fff95994400) at /usr/src/debug/kdevelop5-21.12.3-lp153.11.2.x86_64/plugins/clang/duchain/builder.cpp:1471 #32 Builder::visit (tu=<optimized out>, file=<optimized out>, includes=..., update=<optimized out>) at /usr/src/debug/kdevelop5-21.12.3-lp153.11.2.x86_64/plugins/clang/duchain/builder.cpp:1618 #33 0x00007fff9165aced in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, QFlags<KDevelop::TopDUContext::Feature>, QHash<void*, KDevelop::ReferencedTopDUContext>&, QHash<KDevelop::IndexedString, KDevelop::ModificationRevision> const&, KDevelop::IndexedString const&, ClangIndex*, std::function<bool ()> const&) ( file=<optimized out>, imports=..., session=..., features=..., features@entry=..., includedFiles=..., unsavedRevisions=..., parseDocument=..., index=0x55555e572160, abortFunction=...) at /usr/src/debug/kdevelop5-21.12.3-lp153.11.2.x86_64/plugins/clang/duchain/clanghelpers.cpp:207 #34 0x00007fff9165a67f in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, QFlags<KDevelop::TopDUContext::Feature>, QHash<void*, KDevelop::ReferencedTopDUContext>&, QHash<KDevelop::IndexedString, KDevelop::ModificationRevision> const&, KDevelop::IndexedString const&, ClangIndex*, std::function<bool ()> const&) ( file=<optimized out>, imports=..., session=..., features=..., includedFiles=..., unsavedRevisions=..., parseDocument=..., index=0x55555e572160, abortFunction=...) at /usr/src/debug/kdevelop5-21.12.3-lp153.11.2.x86_64/plugins/clang/duchain/clanghelpers.cpp:121 #35 0x00007fff918c514f in ClangParseJob::run (this=0x555563b02530) at /usr/src/debug/kdevelop5-21.12.3-lp153.11.2.x86_64/plugins/clang/clangparsejob.cpp:326 #36 0x00007fffea527cba in ThreadWeaver::IdDecorator::run (this=<optimized out>, self=..., thread=0x55555e22bbd0) at /usr/src/debug/threadweaver-5.92.0-lp153.230.1.x86_64/src/iddecorator.cpp:50 #37 0x00007fffea5278e8 in ThreadWeaver::Executor::run (this=<optimized out>, job=..., thread=<optimized out>) at /usr/src/debug/threadweaver-5.92.0-lp153.230.1.x86_64/src/executor.cpp:33 #38 0x00007fffea528430 in ThreadWeaver::Job::execute (this=<optimized out>, self=..., th=0x55555e22bbd0) at /usr/src/debug/threadweaver-5.92.0-lp153.230.1.x86_64/src/job.cpp:64 #39 0x00007fffea52c05d in ThreadWeaver::Thread::run (this=0x55555e22bbd0) at /usr/src/debug/threadweaver-5.92.0-lp153.230.1.x86_64/src/thread.cpp:98 #40 0x00007ffff49239cc in QThreadPrivate::start (arg=0x55555e22bbd0) at thread/qthread_unix.cpp:331 #41 0x00007fffecb736ea in start_thread () from /lib64/libpthread.so.0 #42 0x00007ffff4155a8f in clone () from /lib64/libc.so.6 STEPS TO REPRODUCE 1. Start kdevelop with my project 2. Wait while the background parser runs 3. Watch it crash OBSERVED RESULT It crashes EXPECTED RESULT I expect it not to crash SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: OpenSUSE 15.3/Plasma 5.24.3 (available in About System) KDE Plasma Version: 5..24.3 KDE Frameworks Version: 5.92.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION clang version 11 -- You are receiving this mail because: You are watching all bug changes.