| Summary: | Kdevelop crashes with a segmentation fault when parsing my project | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Gus Fernandez <gfernandez> |
| Component: | general | Assignee: | kdevelop-bugs-null |
| Status: | REPORTED --- | ||
| Severity: | critical | CC: | andreas_nordal_4, davidroman96+kdebugs, igorkuo, kurte1986, mail, torotil |
| Priority: | NOR | ||
| Version First Reported In: | 5.3.2 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Kdevelop backtrace | ||
|
Description
Gus Fernandez
2019-05-22 18:59:48 UTC
Created attachment 131672 [details]
Kdevelop backtrace
I have the same symptom with Kdevelop 5.6.0 – sigsegv when parsing the project. I ran kdevelop in gdb to get the backtrace. I did this 3 times to see if it segfaults at the same place every time, and it seems so: clang::InjectedClassNameType::getDecl in tools/clang/lib/AST/Type.cpp:3387 This happens in an extremely deep recursion inside libclang-10: The two functions TransformTypos::RecursiveTransformLoop and TransformTypos::CheckForRecursiveTypos are running in tandem 23214 or 20548 times (not the same every time) before calling the series of functions that lead to the segfault. I don’t have a backtrace, but for me it fails when opening a Python project while parsing the site-packages. Interestingly it fails when IPython is installed, but it doesn’t when I uninstall it. (gentoo, kdevelop 5.6.0) The last comment is probably https://bugs.kde.org/show_bug.cgi?id=426292, and unrelated to the original report. I'm using kdevelop 5.13.240201 and it crashes for me. Some months ago it crashed and I solved it by removing the cache and kdevelop project files and starting from zero. Then it crashed again. Today while I was building the project and changing some files it crashed and now every time I open the problematic project it crashes.
It also seems to be related with clang, from gdb backtrace:
#0 0x00007fffbdec44d0 in clang_getFileContents () at /usr/lib/llvm/17/lib64/libclang.so.17
#1 0x00007fffc79c7188 in ClangUtils::getRawContents (unit=unit@entry=0x7ffe9c009a40, range=...)
at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/util/clangutils.cpp:345
#2 0x00007fffc79b0e34 in (anonymous namespace)::fixitsForDiagnostic (diagnostic=diagnostic@entry=0x7ffec059e570, unit=unit@entry=0x7ffe9c009a40)
at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/duchain/clangproblem.cpp:63
#3 0x00007fffc79b175c in ClangProblem::ClangProblem (this=0x7ffec0a9e540, diagnostic=0x7ffec059e570, unit=0x7ffe9c009a40)
at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/duchain/clangproblem.cpp:154
#4 0x00007fffc79b1a15 in ClangProblem::ClangProblem (this=this@entry=0x7ffec0a9c7e0, diagnostic=diagnostic@entry=0x7ffec059eb60, unit=unit@entry=0x7ffe9c009a40)
at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/duchain/clangproblem.cpp:164
#5 0x00007fffc79c1422 in UnknownDeclarationProblem::UnknownDeclarationProblem
(this=this@entry=0x7ffec0a9c7e0, diagnostic=diagnostic@entry=0x7ffec059eb60, unit=unit@entry=0x7ffe9c009a40)
at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/duchain/unknowndeclarationproblem.cpp:535
#6 0x00007fffc79a423d in ClangDiagnosticEvaluator::createProblem (diagnostic=diagnostic@entry=0x7ffec059eb60, unit=0x7ffe9c009a40)
at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/duchain/clangdiagnosticevaluator.cpp:108
#7 0x00007fffc79b9efc in ParseSession::getOrCreateProblem (this=this@entry=0x7fff53dffac8, indexInTU=indexInTU@entry=9, diagnostic=diagnostic@entry=0x7ffec059eb60)
at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/duchain/parsesession.cpp:501
(In reply to David Roman from comment #5) > I'm using kdevelop 5.13.240201 and it crashes for me. Some months ago it > crashed and I solved it by removing the cache and kdevelop project files and > starting from zero. Then it crashed again. Today while I was building the > project and changing some files it crashed and now every time I open the > problematic project it crashes. Your backtrace clearly differs from the backtrace attached to this bug. Today I experienced the same crash as you and created a dedicated bug report for it: Bug 510603. |