[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2024-03-01 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

Igor Kushnir  changed:

   What|Removed |Added

 CC||cyco...@hotmail.com

--- Comment #34 from Igor Kushnir  ---
*** Bug 482109 has been marked as a duplicate of this bug. ***

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2023-03-15 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #33 from Igor Kushnir  ---
https://github.com/llvm/llvm-project/commit/4d55a0b512a17dfaa2461b8803d37b79f6c9691d
has been reverted and replaced with
https://github.com/llvm/llvm-project/commit/48fb6659610a3177e8606681046dfa0d19f67203,
which no longer adds new API, but instead shuffles declaration and adds
documentation. The gist of the fix in clang/tools/libclang/CXType.cpp remains
the same.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2023-03-13 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

Igor Kushnir  changed:

   What|Removed |Added

 Status|CONFIRMED   |RESOLVED
 Resolution|--- |UPSTREAM

--- Comment #32 from Igor Kushnir  ---
The bug fix just landed. It will be released in LLVM/Clang 17:
https://github.com/llvm/llvm-project/commit/4d55a0b512a17dfaa2461b8803d37b79f6c9691d

Users affected by this bug can ask their distro maintainers to apply the fix to
older LLVM packages. No need to apply the entire patch as it adds new API. The
following reduced diff fixes the crash:

 int clang_getFieldDeclBitWidth(CXCursor C) {
   using namespace cxcursor;

   if (clang_isDeclaration(C.kind)) {
 const Decl *D = getCursorDecl(C);

-if (const FieldDecl *FD = dyn_cast_or_null(D)) {
-  if (FD->isBitField())
-if (const auto *FD = dyn_cast_or_null(D)) {
-  if (FD->isBitField() && !FD->getBitWidth()->isValueDependent())
 return FD->getBitWidthValue(getCursorContext(C));
 }
   }

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2023-03-07 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=438249

Bug Janitor Service  changed:

   What|Removed |Added

   Priority|NOR |HI

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2023-03-07 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

Igor Kushnir  changed:

   What|Removed |Added

 CC||nm...@yandex.com

--- Comment #31 from Igor Kushnir  ---
*** Bug 466975 has been marked as a duplicate of this bug. ***

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2023-03-06 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

Igor Kushnir  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|REPORTED|CONFIRMED

--- Comment #30 from Igor Kushnir  ---
Managed to reproduce the assertion failure in KDevelop master built against
fresh libclang version 17.0.0-git by opening the file
/usr/include/boost/container/string.hpp in a session containing a couple of
tiny projects and waiting for the background parser to parse this file. Found
the upstream bug https://github.com/llvm/llvm-project/issues/56644 and
mentioned this KDevelop crash in a comment to it.

The backtrace:
*** Program received signal SIGABRT (Aborted) ***
#0 0x7f42848a08ec in () at /usr/lib/libc.so.6
#1 0x7f4284851ea8 in raise () at /usr/lib/libc.so.6
#2 0x7f428483b53d in abort () at /usr/lib/libc.so.6
#3 0x7f428483b45c in () at /usr/lib/libc.so.6
#4 0x7f428484a9f6 in () at /usr/lib/libc.so.6
#5 0x7f421116303d in clang::Expr::EvaluateKnownConstInt(clang::ASTContext
const&, llvm::SmallVectorImpl >*) const (this=, Ctx=,
Diag=Diag@entry=0x0) at llvm-project/clang/lib/AST/ExprConstant.cpp:15473
#6 0x7f421104e7a5 in clang::FieldDecl::getBitWidthValue(clang::ASTContext
const&) const (this=, Ctx=) at
llvm-project/clang/lib/AST/Decl.cpp:4309
#7 0x7f421b0b972b in (anonymous
namespace)::Visitor::setDeclData<(CXCursorKind)6>(CXCursor,
KDevelop::ClassMemberDeclaration*) const (this=0x7f421a702ff0, cursor=...,
decl=0x7f420202d170) at kdevelop/plugins/clang/duchain/builder.cpp:1159
#8 0x7f421b0a6d4a in (anonymous
namespace)::Visitor::createDeclarationCommon<(CXCursorKind)6,
KDevelop::ClassMemberDeclaration>(CXCursor, KDevelop::Identifier const&)
(this=0x7f421a702ff0, cursor=..., id=...) at
kdevelop/plugins/clang/duchain/builder.cpp:445
#9 0x7f421b09a789 in (anonymous
namespace)::Visitor::createDeclaration<(CXCursorKind)6,
KDevelop::ClassMemberDeclaration>(CXCursor, KDevelop::Identifier const&,
KDevelop::DUContext*) (this=0x7f421a702ff0, cursor=..., id=..., context=0x0) at
kdevelop/plugins/clang/duchain/builder.cpp:456
#10 0x7f421b093591 in (anonymous
namespace)::Visitor::buildDeclaration<(CXCursorKind)6,
KDevelop::ClassMemberDeclaration, false>(CXCursor) (this=0x7f421a702ff0,
cursor=...) at kdevelop/plugins/clang/duchain/builder.cpp:1293
#11 0x7f421b088e99 in (anonymous
namespace)::Visitor::dispatchCursor<(CXCursorKind)6>(CXCursor, CXCursor)
(this=0x7f421a702ff0, cursor=..., parent=...) at
kdevelop/plugins/clang/duchain/builder.cpp:1009
#12 0x7f421b082309 in (anonymous namespace)::visitCursor(CXCursor,
CXCursor, CXClientData) (cursor=..., parent=..., data=0x7f421a702ff0) at
kdevelop/plugins/clang/duchain/builder.cpp:1675
#13 0x7f4210f2b400 in clang::cxcursor::CursorVisitor::Visit(CXCursor, bool)
(this=0x7f421a700ec0, Cursor=..., CheckedRegionOfInterest=) at
llvm-project/clang/tools/libclang/CIndex.cpp:220
#14 0x7f4210f31e66 in
clang::cxcursor::CursorVisitor::handleDeclForVisitation(clang::Decl const*)
(this=0x7f421a700ec0, D=0x7f41e0443490) at
llvm-project/clang/tools/libclang/CIndex.cpp:682
#15 0x7f4210f32021 in
clang::cxcursor::CursorVisitor::VisitDeclContext(clang::DeclContext*)
(this=0x7f421a700ec0, DC=0x7f41e0443148) at
llvm-project/clang/tools/libclang/CIndex.cpp:643
#16 0x7f4210f2aca8 in
clang::cxcursor::CursorVisitor::VisitChildren(CXCursor) (this=0x7f421a700ec0,
Cursor=...) at llvm-project/clang/tools/libclang/CIndex.cpp:509
#17 0x7f4210f2b2c1 in clang_visitChildren(CXCursor, CXCursorVisitor,
CXClientData) (parent=..., visitor=0x7f421b081f0f <(anonymous
namespace)::visitCursor(CXCursor, CXCursor, CXClientData)>,
client_data=0x7f421a702ff0) at
llvm-project/clang/tools/libclang/CIndex.cpp:4827
#18 0x7f421b0a42f8 in (anonymous
namespace)::Visitor::buildDeclaration<(CXCursorKind)2,
KDevelop::ClassDeclaration, true>(CXCursor) (this=0x7f421a702ff0, cursor=...)
at kdevelop/plugins/clang/duchain/builder.cpp:1290
#19 0x7f421b0999dd in (anonymous
namespace)::Visitor::dispatchCursor<(CXCursorKind)2, (Decision)0,
(Decision)0>(CXCursor, CXCursor) (this=0x7f421a702ff0, cursor=..., parent=...)
at kdevelop/plugins/clang/duchain/builder.cpp:1009
#20 0x7f421b092ac7 in (anonymous
namespace)::Visitor::dispatchCursor<(CXCursorKind)2, (Decision)0,
(Decision)2>(CXCursor, CXCursor) (this=0x7f421a702ff0, cursor=..., parent=...)
at kdevelop/plugins/clang/duchain/builder.cpp:984
#21 0x7f421b088a79 in (anonymous
namespace)::Visitor::dispatchCursor<(CXCursorKind)2>(CXCursor, CXCursor)
(this=0x7f421a702ff0, cursor=..., parent=...) at
kdevelop/plugins/clang/duchain/builder.cpp:972
#22 0x7f421b082185 in (anonymous namespace)::visitCursor(CXCursor,
CXCursor, CXClientData) (cursor=..., parent=..., data=0x7f421a702ff0) at
kdevelop/plugins/clang/duchain/builder.cpp:1671
#23 0x7f4210f2b400 in clang

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2023-03-03 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

Igor Kushnir  changed:

   What|Removed |Added

 CC||anonymous11oneeleven@gmail.
   ||com

--- Comment #29 from Igor Kushnir  ---
*** Bug 466791 has been marked as a duplicate of this bug. ***

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2023-02-27 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #28 from Igor Kushnir  ---
(In reply to Arthur Gruzauskas from comment #27)
> Happy to supply any info, or do any suggested bug hunting.
Someone has to propose a LLVM fix and get it in. I plan to do so if I manage to
reproduce the bug locally. But not sure when I get to it.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2023-02-27 Thread Arthur Gruzauskas
https://bugs.kde.org/show_bug.cgi?id=438249

Arthur Gruzauskas  changed:

   What|Removed |Added

Version|unspecified |git master
   Platform|Debian stable   |Debian testing

--- Comment #27 from Arthur Gruzauskas  ---
Have been using kdevelop git master successfully for the last 8 months with the
following patch suggested by Igor:

---
--- kdevelop-22.04.1-orig/plugins/clang/duchain/builder.cpp 2022-06-01
21:11:28.907037431 +0300
+++ kdevelop-22.04.1/plugins/clang/duchain/builder.cpp  2022-06-01
21:12:48.177035132 +0300
@@ -1080,7 +1080,7 @@
 #endif

 #if CINDEX_VERSION_MINOR >= 16
-decl->setBitWidth(clang_getFieldDeclBitWidth(cursor));
+decl->setBitWidth(-1);
 #endif

 if (clang_isCursorDefinition(cursor)) {
---

The other day had to reinstall Debian testing, and again the same crash on a
freshly compiled kdevelop git master doing an initial source parse. The above
patch worked yet again.

Happy to supply any info, or do any suggested bug hunting.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-22 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

Igor Kushnir  changed:

   What|Removed |Added

 CC||kaleemsag...@gmail.com

--- Comment #26 from Igor Kushnir  ---
*** Bug 455769 has been marked as a duplicate of this bug. ***

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-07 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #25 from Igor Kushnir  ---
> Compiled clang-13 back without DEBUG and now I get the same crash with it as
> well.
Perhaps the crash started occurring because of the toolchain
(g++/libstdc++/glibc) upgrade or different comper flags, not Clang upgrade. So
when Clang 13 was recompiled against the newer toolchain version, the crash
appeared. But in any case Clang's assertion fails, so it is probably a Clang
bug.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-07 Thread Andrei Slavoiu
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #24 from Andrei Slavoiu  ---
Created attachment 149527
  --> https://bugs.kde.org/attachment.cgi?id=149527&action=edit
New crash information added by DrKonqi

kdevelop (5.8.220401 (22.04.1)) using Qt 5.15.4

- What I was doing when the application crashed:
Compiled clang-13 back without DEBUG and now I get the same crash with it as
well.

-- Backtrace (Reduced):
#6  0x7fc50833d030 in __memmove_avx_unaligned_erms () at
../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:801
#7  0x7fc45184af1b in llvm::APInt::APInt(llvm::APInt const&) (that=...,
this=0x7fc41e7f82c0) at /usr/lib/llvm/13/include/llvm/ADT/APInt.h:321
#8  llvm::APSInt::APSInt(llvm::APSInt const&) (this=0x7fc41e7f82c0) at
/usr/lib/llvm/13/include/llvm/ADT/APSInt.h:22
#9  clang::Expr::EvaluateKnownConstInt(clang::ASTContext const&,
llvm::SmallVectorImpl >*) const (this=0x7fc2d0226918, Ctx=...,
Diag=Diag@entry=0x0) at
/usr/src/debug/sys-devel/clang-13.0.1/clang/lib/AST/ExprConstant.cpp:15006
#10 0x7fc4517b449f in clang::FieldDecl::getBitWidthValue(clang::ASTContext
const&) const (this=, Ctx=) at
/usr/src/debug/sys-devel/clang-13.0.1/clang/lib/AST/Decl.cpp:4172

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-07 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #23 from Igor Kushnir  ---
> Hah, good point. The assert fails on clang-13 as well when built with DEBUG.
> Probably on 13 it just happened to return some junk instead of crashing.
What bit width does it return?

> Perhaps clang::FieldDecl::getBitWidthValue() should check if the bit width is 
> value-dependent before calling Expr::EvaluateKnownConstInt().
> Or perhaps clang_getFieldDeclBitWidth() should check that.
You can attempt to fix the bug yourself with placing a check in one of these
two functions.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-06 Thread Andrei Slavoiu
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #22 from Andrei Slavoiu  ---
(In reply to Igor Kushnir from comment #21)
> If you want to play with this some more, you could try building Clang 13
> with assertions enabled and see if the assertion is triggered. If yes, then
> the absence of the crash is accidental. If the assertion does not fail, then
> maybe it's a regression in Clang 14.

Hah, good point. The assert fails on clang-13 as well when built with DEBUG.
Probably on 13 it just happened to return some junk instead of crashing.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-06 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #21 from Igor Kushnir  ---
If you want to play with this some more, you could try building Clang 13 with
assertions enabled and see if the assertion is triggered. If yes, then the
absence of the crash is accidental. If the assertion does not fail, then maybe
it's a regression in Clang 14.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-06 Thread Andrei Slavoiu
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #20 from Andrei Slavoiu  ---
(In reply to Igor Kushnir from comment #19)
> If you can reproduce the crash consistently with Clang 14
> (I cannot with my system Clang 13), report the bug.
Yes, it crashes consistently with clang 14, I'll look into reporting the bug
upstream.

> Does KDevelop compiled against Clang 13 call Clang 14 implementation at
> runtime or does it keep using the Clang 13 version it was compiled against?
Gentoo puts the libraries of each clang version in it's own dir, so it keeps
using the one it was built with:
# ldd /usr/lib64/qt5/plugins/kdevplatform/36/kdevclangsupport.so | grep llvm
libclang.so.13 => /usr/lib/llvm/13/lib64/libclang.so.13
(0x7f3303933000)
libLLVM-13.so => /usr/lib/llvm/13/lib64/../lib64/libLLVM-13.so
(0x7f32fafd9000)
After adjusting the symlinks from llvm/13 to point to the ones in llvm/14,
kdevelop built with clang-13 and ran with clang-14 crashes the same way as the
one built with clnag-14.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-04 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #19 from Igor Kushnir  ---
(In reply to Andrei Slavoiu from comment #17)
> No, not std::string. boost::string. Found the culprit:
> 
>   //This is the structure controlling a long string
>struct long_t
>{
>   size_type  is_short  : 1;
>   size_type  length: (sizeof(size_type)*CHAR_BIT - 1);
> And another correction, it's boost::container::string. Looks like boost has 
> multiple string implementations.
Apparently Clang 14 considers the bit width of long_t::length value-dependent.
Perhaps clang::FieldDecl::getBitWidthValue() should check if the bit width is
value-dependent before calling Expr::EvaluateKnownConstInt(). Or perhaps
clang_getFieldDeclBitWidth() should check that. If you can reproduce the crash
consistently with Clang 14 (I cannot with my system Clang 13), report the bug.

> Also, I compiled kdevelop with clang-13 again, and no more crash. Weird.
Does KDevelop compiled against Clang 13 call Clang 14 implementation at runtime
or does it keep using the Clang 13 version it was compiled against?

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-03 Thread Andrei Slavoiu
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #18 from Andrei Slavoiu  ---
And another correction, it's boost::container::string. Looks like boost has
multiple string implementations.

Also, I compiled kdevelop with clang-13 again, and no more crash. Weird.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-02 Thread Andrei Slavoiu
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #17 from Andrei Slavoiu  ---
No, not std::string. boost::string. Found the culprit:

  //This is the structure controlling a long string
   struct long_t
   {
  size_type  is_short  : 1;
  size_type  length: (sizeof(size_type)*CHAR_BIT - 1);

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-02 Thread Andrei Slavoiu
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #16 from Andrei Slavoiu  ---
Looks like it's parsing std::string when crashing?!?!

[Thread 0x7ffec67fc640 (LWP 2174) exited]
setDeclData "class basic_string_base< Allocator >" ""
setDeclData " operator=" ""
setDeclData " basic_string_base" ""
setDeclData " allocator_type" ""
setDeclData " allocator_traits_type" ""
setDeclData " stored_allocator_type" ""
setDeclData " pointer" ""
setDeclData " value_type" ""
setDeclData " size_type" ""
setDeclData " difference_type" ""
setDeclData " pointer_traits" ""
setDeclData " basic_string_base" ""
setDeclData " basic_string_base" ""
setDeclData " basic_string_base" ""
setDeclData " basic_string_base" ""
setDeclData " basic_string_base" ""
setDeclData " ~basic_string_base" ""
setDeclData "class long_t" ""
setDeclData " is_short" ""
setDeclData " length" ""
[New Thread 0x7ffec67fc640 (LWP 2208)]
kdevelop:
/var/tmp/portage/sys-devel/clang-14.0.4/work/clang/lib/AST/ExprConstant.cpp:15103:
llvm::APSInt clang::Expr::EvaluateKnownConstInt(const clang::ASTContext&,
llvm::SmallVectorImpl >*) const: Assertion `!isValueDependent() &&
"Expression evaluator can't be called on a dependent expression."' failed.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-02 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #15 from Igor Kushnir  ---
> Assertion `!isValueDependent() && "Expression evaluator can't be called on a 
> dependent expression."' failed.
Thanks for checking this so quickly!
This must really be an upstream libclang bug because
clang_getFieldDeclBitWidth() has no preconditions. From
https://clang.llvm.org/doxygen/group__CINDEX__TYPES.html#ga80bbb872dde5b2f26964081338108f91:
> CINDEX_LINKAGE int clang_getFieldDeclBitWidth(CXCursor C) 
> Retrieve the bit width of a bit field declaration as an integer.
> If a cursor that is not a bit field declaration is passed in, -1 is returned.
In order to report the libclang bug, we need to figure out which data member of
which class causes it first. Can someone try inserting the line `qCritical() <<
"setDeclData" << decl->toString() << decl->comment();` just above the crashing
`decl->setBitWidth` line in KDevelop's builder.cpp, reproduce the crash and
hopefully determine a minimum reproducible example based on the last
"setDeclData" line printed before the crash?

Note that `decl->toString()` returns the type and the name of the data member
and `decl->comment()` returns the data member's associated documentation. Also
note that KDevelop parses data members of a class in order, so the lines
immediately preceding the last one before the crash could help identify the
class and the data member that causes the crash.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-02 Thread Andrei Slavoiu
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #14 from Andrei Slavoiu  ---
Here is the assert. For some reason DrKonqi does not handle it, so I got the
stacktrace manually:

kdevelop:
/var/tmp/portage/sys-devel/clang-14.0.4/work/clang/lib/AST/ExprConstant.cpp:15103:
llvm::APSInt clang::Expr::EvaluateKnownConstInt(const clang::ASTContext&,
llvm::SmallVectorImpl >*) const: Assertion `!isValueDependent() &&
"Expression evaluator can't be called on a dependent expression."' failed.

Thread 41 "Queue(0x58c" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff41560640 (LWP 24484)]
__pthread_kill_implementation (threadid=, signo=signo@entry=6,
no_tid=no_tid@entry=0) at pthread_kill.c:44
44return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO
(ret) : 0;
(gdb) bt
#0  __pthread_kill_implementation (threadid=,
signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x75f77d1f in __pthread_kill_internal (signo=6, threadid=) at pthread_kill.c:78
#2  0x75f2aa62 in __GI_raise (sig=sig@entry=6) at
../sysdeps/posix/raise.c:26
#3  0x75f15469 in __GI_abort () at abort.c:79
#4  0x75f15395 in __assert_fail_base
(fmt=0x760a3c80 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=0x7fff4f2c2c98 "!isValueDependent() && \"Expression evaluator can't
be called on a dependent expression.\"", file=0x7fff4f2c53b0
"/var/tmp/portage/sys-devel/clang-14.0.4/work/clang/lib/AST/ExprConstant.cpp",
line=15103, function=) at assert.c:92
#5  0x75f239d2 in __GI___assert_fail
(assertion=0x7fff4f2c2c98 "!isValueDependent() && \"Expression evaluator
can't be called on a dependent expression.\"", file=0x7fff4f2c53b0
"/var/tmp/portage/sys-devel/clang-14.0.4/work/clang/lib/AST/ExprConstant.cpp",
line=15103, function=0x7fff4f2cf7f0 "llvm::APSInt
clang::Expr::EvaluateKnownConstInt(const clang::ASTContext&,
llvm::SmallVectorImpl >*) const") at assert.c:101
#6  0x7fff4de82d71 in clang::Expr::EvaluateKnownConstInt(clang::ASTContext
const&, llvm::SmallVectorImpl >*) const (this=, Ctx=,
Diag=Diag@entry=0x0)
at
/usr/src/debug/sys-devel/clang-14.0.4/clang/lib/AST/ExprConstant.cpp:15103
#7  0x7fff4ddc979b in clang::FieldDecl::getBitWidthValue(clang::ASTContext
const&) const (this=, Ctx=) at
/usr/src/debug/sys-devel/clang-14.0.4/clang/lib/AST/Decl.cpp:4206
#8  0x7fff4fcc1bff in (anonymous
namespace)::Visitor::setDeclData<(CXCursorKind)6>(CXCursor,
KDevelop::ClassMemberDeclaration*) (cursor=..., decl=decl@entry=0x7fff2a075a00,
this=0x7fff4155efa0) at
/usr/src/debug/dev-util/kdevelop-22.04.1/kdevelop-22.04.1/plugins/clang/duchain/builder.cpp:1083
#9  0x7fff4fcd346a in (anonymous
namespace)::Visitor::createDeclarationCommon<(CXCursorKind)6,
KDevelop::ClassMemberDeclaration>(CXCursor, KDevelop::Identifier const&)
(this=this@entry=0x7fff4155efa0, cursor=..., id=...)
at
/usr/src/debug/dev-util/kdevelop-22.04.1/kdevelop-22.04.1/plugins/clang/duchain/builder.cpp:442
#10 0x7fff4fcd404b in (anonymous
namespace)::Visitor::createDeclaration<(CXCursorKind)6,
KDevelop::ClassMemberDeclaration> (context=0x0, id=..., cursor=...,
this=0x7fff4155efa0) at
/usr/src/debug/dev-util/kdevelop-22.04.1/kdevelop-22.04.1/plugins/clang/duchain/builder.cpp:451
#11 (anonymous namespace)::Visitor::buildDeclaration<(CXCursorKind)6,
KDevelop::ClassMemberDeclaration, false>(CXCursor)
(this=this@entry=0x7fff4155efa0, cursor=...) at
/usr/src/debug/dev-util/kdevelop-22.04.1/kdevelop-22.04.1/plugins/clang/duchain/builder.cpp:1217
#12 0x7fff4fcd5010 in (anonymous
namespace)::Visitor::dispatchCursor<(CXCursorKind)6> (parent=..., cursor=...,
this=0x7fff4155efa0) at
/usr/src/debug/dev-util/kdevelop-22.04.1/kdevelop-22.04.1/plugins/clang/duchain/builder.cpp:965
#13 (anonymous namespace)::visitCursor(CXCursor, CXCursor, CXClientData)
(cursor=..., parent=..., data=0x7fff4155efa0) at
/usr/src/debug/dev-util/kdevelop-22.04.1/kdevelop-22.04.1/plugins/clang/duchain/builder.cpp:1554
#14 0x7fff4dccd9c5 in clang::cxcursor::CursorVisitor::Visit(CXCursor, bool)
(this=0x7fff4155e580, Cursor=..., CheckedRegionOfInterest=) at
/usr/src/debug/sys-devel/clang-14.0.4/clang/tools/libclang/CIndex.cpp:220
#15 0x7fff4dcd3add in
clang::cxcursor::CursorVisitor::handleDeclForVisitation(clang::Decl const*)
(this=0x7fff4155e580, D=0x7ffec0bfc4c0) at
/usr/src/debug/sys-devel/clang-14.0.4/clang/tools/libclang/CIndex.cpp:682
#16 0x7fff4dcd3bd0 in
clang::cxcursor::CursorVisitor::VisitDeclContext(clang::DeclContext*)
(this=0x7fff4155e580, DC=0x7ffec0bfc088) at
/usr/src/debug/sys-devel/clang-14.0.4/clang/tools/libclang/CIndex.cpp:643
#17 0x7fff4dccd2b2 in
clang::cxcursor::CursorVisitor::VisitChildren(CXCursor) (this=0x7fff4155e580,
Cursor=...) at
/usr/src/debug/sys-devel/clang-14.0.4/clang/tools/libclang/CIndex.cpp:509
#18 0x7fff4dccd899 in clang_visitChildren(CXCursor, CXCursorVisitor,
CXClientData) (parent=..., visitor=, client_data=) at
/usr/src/debug/sys-devel/clang-14.0.4/

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-02 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #13 from Igor Kushnir  ---
> Delays in responding to your problem solving request.
This is not an urgent request. No need to apologize for a delay so verbosely :)

>  "No ffs implementation found"
No idea about this, sorry.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-02 Thread Arthur Gruzauskas
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #12 from Arthur Gruzauskas  ---
Hi Igor,

Delays in responding to your problem solving request.

Having issues trying to compile clang13 with debian  'apt build-dep', 
which is my first approach as I am somewhat familiar with it.

=> "No ffs implementation found" is the current temporary roadblock. My 
problem, not yours. Unless you already know an obvious solution, of course.

I'm not after any hand holding, I am not just presenting you with the 
original issue and then whining at every small roadblock and then going 
away leaving you with my problem. I'm just saying your request for a 
debugging clang13 requires me to to fill in my own gaps in knowledge, 
which will take as long as it takes.

My motivation is I want a native kdevelop, not some bloody AppImage!

Sorry for the waffling, you can always skim past it 😉

Arthur, who babbles when on an intellectual hunt


On 2/6/22 5:12 pm, Igor Kushnir wrote:
> https://bugs.kde.org/show_bug.cgi?id=438249
>
> --- Comment #7 from Igor Kushnir  ---
> Could someone try to get the backtrace of this crash with assertions enabled?
> (NDEBUG not defined)
> When I navigate through the crash call stacks from
> https://code.woboq.org/llvm/clang/tools/libclang/CXType.cpp.html#374, I see
> several assert() calls, especially here:
> https://code.woboq.org/llvm/clang/lib/AST/ExprConstant.cpp.html#_ZNK5clang4Expr21EvaluateKnownConstIntERKNS_10ASTContextEPN4llvm15SmallVectorImplISt4pairINS_14SourceLocationENS_17PartialDiagnostic
>

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-02 Thread Andrei Slavoiu
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #11 from Andrei Slavoiu  ---
(In reply to Igor Kushnir from comment #5)
> Arthur, Andrei, do your projects use wxWidgets?
No

> Also, when you write that the crash started occurring after an
> update/rebuild of KDevelop, were your projects or some libraries
> they use updated at the same time too?
I don't remember any significant code changes around that time.
But I could downgrade to the version built with clang-13 and see how it behaves
with current code.

(In reply to Igor Kushnir from comment #7)
> Could someone try to get the backtrace of this crash with assertions
> enabled? (NDEBUG not defined)
I'll give it a try.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-02 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

Igor Kushnir  changed:

   What|Removed |Added

 CC||kogiokkaf...@gmail.com

--- Comment #10 from Igor Kushnir  ---
*** Bug 431811 has been marked as a duplicate of this bug. ***

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-02 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #9 from Igor Kushnir  ---
*** Bug 454685 has been marked as a duplicate of this bug. ***

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-02 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #8 from Igor Kushnir  ---
(In reply to Igor Kushnir from comment #7)
> Could someone try to get the backtrace of this crash with assertions
> enabled? (NDEBUG not defined)
I mean: assertions enabled/NDEBUG not defined while building Clang.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-02 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #7 from Igor Kushnir  ---
Could someone try to get the backtrace of this crash with assertions enabled?
(NDEBUG not defined)
When I navigate through the crash call stacks from
https://code.woboq.org/llvm/clang/tools/libclang/CXType.cpp.html#374, I see
several assert() calls, especially here:
https://code.woboq.org/llvm/clang/lib/AST/ExprConstant.cpp.html#_ZNK5clang4Expr21EvaluateKnownConstIntERKNS_10ASTContextEPN4llvm15SmallVectorImplISt4pairINS_14SourceLocationENS_17PartialDiagnostic

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-01 Thread Arthur Gruzauskas
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #6 from Arthur Gruzauskas  ---
Igor,

I don't use wxWidgets.

What was installed before the crash with the latest debian kdevelop:

2022-05-29 17:57:53 install libkf5configqml5:amd64  5.94.0-3
2022-05-29 17:57:54 install libkf5kcmutilscore5:amd64  5.94.0-2
2022-05-31 01:06:36 install qtbase5-examples:amd64  5.15.2+dfsg-16+b1
2022-05-31 10:05:07 install libqt6multimedia6:amd64  6.2.4-2
2022-05-31 10:05:07 install libqt6multimediaquick6:amd64  6.2.4-2
2022-05-31 10:05:08 install libqt6multimediawidgets6:amd64  6.2.4-2
2022-05-31 10:05:08 install qt6-image-formats-plugins:amd64  6.2.4-2
2022-05-31 10:05:08 install qt6-multimedia-dev:amd64  6.2.4-2
2022-05-31 10:05:08 install qt6-xdgdesktopportal-platformtheme:amd64 
 6.2.4+dfsg-5
2022-06-01 15:45:09 install libsnapd-glib1:amd64  1.60-1
2022-06-01 15:45:10 install kdevelop58-libs:amd64  4:22.04.1-2
2022-06-01 15:45:13 install libkf5prisonscanner5:amd64  5.94.0-2
2022-06-01 16:01:40 install kdevelop-dbgsym:amd64  4:22.04.1-2
2022-06-01 16:01:42 install kdevelop-pg-qt-dbgsym:amd64  2.2.1-2
2022-06-01 16:01:42 install plasma-kdevelop-dbgsym:amd64  4:22.04.1-2
2022-06-01 16:37:47 install kdevelop-data:all  4:22.04.1-2
2022-06-01 16:37:47 install kdevelop58-libs:amd64  4:22.04.1-2
2022-06-01 16:37:48 install kdevelop:amd64  4:22.04.1-2
2022-06-01 16:37:48 install kdevelop-dbgsym:amd64  4:22.04.1-2
2022-06-01 16:37:49 install kdevelop58-libs-dbgsym:amd64  4:22.04.1-2
2022-06-01 16:51:11 install libclang-common-13-dev-dbgsym:amd64  
1:13.0.1-4
2022-06-01 16:51:11 install libclang1-13-dbgsym:amd64  1:13.0.1-4
2022-06-01 16:51:12 install libkf5threadweaver5-dbgsym:amd64  
5.94.0-1
2022-06-01 16:51:12 install libkf5xmlgui-bin-dbgsym:amd64  5.94.0-1
2022-06-01 16:51:12 install libkf5xmlgui-dev-dbgsym:amd64  5.94.0-1
2022-06-01 16:51:13 install libqt5dbus5-dbgsym:amd64  
5.15.2+dfsg-16+b1
2022-06-01 16:51:13 install libqt5qmlmodels5-dbgsym:amd64  
5.15.2+dfsg-10
2022-06-01 16:51:13 install libqt5qmlworkerscript5-dbgsym:amd64  
5.15.2+dfsg-10
2022-06-01 16:51:13 install libqt5widgets5-dbgsym:amd64  
5.15.2+dfsg-16+b1
2022-06-01 16:51:13 install libusbmuxd6-dbgsym:amd64  2.0.2-3
2022-06-01 16:51:13 install qml-module-qtquick-xmllistmodel-dbgsym:amd64 
 5.15.2-3

Arthur

On 2/6/22 5:25 am, Igor Kushnir wrote:
> https://bugs.kde.org/show_bug.cgi?id=438249
>
> --- Comment #5 from Igor Kushnir  ---
>> Hi, I assume the workaround was applying this patch:
> Yes, thank you for confirming.
>
> Since blaming some specific LLVM versions does not figure, we need to find
> something else in common that may be the root cause of this crash. The 
> reporter
> of Bug 431811 indicated that the crash occurred with wxWidgets-3.1.4 but not
> wxWidgets-3.0.4. Arthur, Andrei, do your projects use wxWidgets? Also, when 
> you
> write that the crash started occurring after an update/rebuild of KDevelop,
> were your projects or some libraries they use updated at the same time too?
>
On 2/6/22 5:25 am, Igor Kushnir wrote:
> https://bugs.kde.org/show_bug.cgi?id=438249
>
> --- Comment #5 from Igor Kushnir  ---
>> Hi, I assume the workaround was applying this patch:
> Yes, thank you for confirming.
>
> Since blaming some specific LLVM versions does not figure, we need to find
> something else in common that may be the root cause of this crash. The 
> reporter
> of Bug 431811 indicated that the crash occurred with wxWidgets-3.1.4 but not
> wxWidgets-3.0.4. Arthur, Andrei, do your projects use wxWidgets? Also, when 
> you
> write that the crash started occurring after an update/rebuild of KDevelop,
> were your projects or some libraries they use updated at the same time too?
>

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-01 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #5 from Igor Kushnir  ---
> Hi, I assume the workaround was applying this patch:
Yes, thank you for confirming.

Since blaming some specific LLVM versions does not figure, we need to find
something else in common that may be the root cause of this crash. The reporter
of Bug 431811 indicated that the crash occurred with wxWidgets-3.1.4 but not
wxWidgets-3.0.4. Arthur, Andrei, do your projects use wxWidgets? Also, when you
write that the crash started occurring after an update/rebuild of KDevelop,
were your projects or some libraries they use updated at the same time too?

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-01 Thread Andrei Slavoiu
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #4 from Andrei Slavoiu  ---
(In reply to Igor Kushnir from comment #3)
> Andrei Slavoiu, could you try the workaround that works for other reporters?

Hi, I assume the workaround was applying this patch:
--- kdevelop-22.04.1-orig/plugins/clang/duchain/builder.cpp 2022-06-01
21:11:28.907037431 +0300
+++ kdevelop-22.04.1/plugins/clang/duchain/builder.cpp  2022-06-01
21:12:48.177035132 +0300
@@ -1080,7 +1080,7 @@
 #endif

 #if CINDEX_VERSION_MINOR >= 16
-decl->setBitWidth(clang_getFieldDeclBitWidth(cursor));
+decl->setBitWidth(-1);
 #endif

 if (clang_isCursorDefinition(cursor)) {


In that case, I confirm that after rebuilding with it kdevelop was able to
complete the background parsing.

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-06-01 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=438249

Igor Kushnir  changed:

   What|Removed |Added

 CC||igor...@gmail.com

--- Comment #3 from Igor Kushnir  ---
Judging by the common "getBitWidthValue" line in the backtraces, this and Bug
454685 are both duplicates of Bug 431811.

Strange that this crash affects only some users. And there is no clear LLVM
version pattern:
* in Bug 431811 it occurred in LLVM 10 and disappeared in LLVM 11;
* in this bug on Arthur's system it occurred in system LLVM 11, but not in the
AppImage with LLVM 10;
* in this bug on Andrei's system it was absent in LLVM 13, but appeared in LLVM
14.
* in Bug 454685 it occurs in LLVM 13.

Andrei Slavoiu, could you try the workaround that works for other reporters?

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-04-12 Thread Andrei Slavoiu
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #2 from Andrei Slavoiu  ---
Created attachment 148116
  --> https://bugs.kde.org/attachment.cgi?id=148116&action=edit
New crash information added by DrKonqi

kdevelop (5.7.211203 (21.12.3)) using Qt 5.15.3

- What I was doing when the application crashed:
The same KDevelop version previously built with llvm-13 parsed the project
successfuly. After rebuilding with llvm-14, it started crashing every time it
reached about 10% of the project.

-- Backtrace (Reduced):
#6  __memmove_avx_unaligned_erms () at
../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:535
#7  0x7fb3f9283bbb in llvm::APInt::APInt(llvm::APInt const&) (that=...,
this=0x7fb3bb7fa470) at /usr/lib/llvm/14/include/llvm/ADT/APInt.h:157
#8  llvm::APSInt::APSInt(llvm::APSInt const&) (this=0x7fb3bb7fa470) at
/usr/lib/llvm/14/include/llvm/ADT/APSInt.h:23
#9  clang::Expr::EvaluateKnownConstInt(clang::ASTContext const&,
llvm::SmallVectorImpl >*) const (this=0x7fb3b1d99a28, Ctx=...,
Diag=Diag@entry=0x0) at
/usr/src/debug/sys-devel/clang-14.0.0-r1/clang/lib/AST/ExprConstant.cpp:15116
#10 0x7fb3f91ec94f in clang::FieldDecl::getBitWidthValue(clang::ASTContext
const&) const (this=, Ctx=) at
/usr/src/debug/sys-devel/clang-14.0.0-r1/clang/lib/AST/Decl.cpp:4206

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2022-04-12 Thread Andrei Slavoiu
https://bugs.kde.org/show_bug.cgi?id=438249

Andrei Slavoiu  changed:

   What|Removed |Added

 CC||ansl...@yahoo.com

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2021-06-14 Thread Arthur Gruzauskas
https://bugs.kde.org/show_bug.cgi?id=438249

Arthur Gruzauskas  changed:

   What|Removed |Added

 CC||deb...@gruz.net

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

[kdevelop] [Bug 438249] fresh kdevelop build from git master source crashes while importing a project

2021-06-08 Thread Arthur Gruzauskas
https://bugs.kde.org/show_bug.cgi?id=438249

--- Comment #1 from Arthur Gruzauskas  ---
Created attachment 139104
  --> https://bugs.kde.org/attachment.cgi?id=139104&action=edit
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.

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