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

Boris Egorov <ego...@linux.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ego...@linux.com

--- Comment #2 from Boris Egorov <ego...@linux.com> ---
I've made a backtrace with Clang debugging symbols, hope it will help. I wanted
to dig a bit further, but gdb hangs completely.

------
template<typename T> using crash = struct : public virtual T {}
(gdb) bt
#0  0x00007fffb084d5da in
clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const
(this=0x7fff3c0c1e20, D=D@entry=0x0)
    at /usr/src/debug/cfe-3.9.1.src/lib/AST/RecordLayoutBuilder.cpp:2929
#1  0x00007fffb084dcc4 in (anonymous
namespace)::EmptySubobjectMap::ComputeEmptySubobjectSizes (this=0x7fff8affacf0)
    at /usr/src/debug/cfe-3.9.1.src/lib/AST/RecordLayoutBuilder.cpp:192
#2  0x00007fffb084dcc4 in (anonymous
namespace)::EmptySubobjectMap::EmptySubobjectMap (Class=0x7fff3c1504f0,
Context=..., this=0x7fff8affacf0)
    at /usr/src/debug/cfe-3.9.1.src/lib/AST/RecordLayoutBuilder.cpp:171
#3  0x00007fffb084dcc4 in
clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const
(this=this@entry=0x7fff3c0c1e20, D=<optimized out>,
    D@entry=0x7fff3c1504f0) at
/usr/src/debug/cfe-3.9.1.src/lib/AST/RecordLayoutBuilder.cpp:2965
#4  0x00007fffb06f7c02 in clang::ASTContext::getTypeInfoImpl(clang::Type
const*) const (this=this@entry=0x7fff3c0c1e20, T=0x7fff3c150590)
    at /usr/src/debug/cfe-3.9.1.src/lib/AST/ASTContext.cpp:1769
#5  0x00007fffb06eed0c in clang::ASTContext::getTypeInfo(clang::Type const*)
const (this=this@entry=0x7fff3c0c1e20, T=<optimized out>,
    T@entry=0x7fff3c150590) at
/usr/src/debug/cfe-3.9.1.src/lib/AST/ASTContext.cpp:1513
#6  0x00007fffb06eef85 in clang::ASTContext::getTypeInfoInChars(clang::Type
const*) const (this=0x7fff3c0c1e20, T=0x7fff3c150590)
    at /usr/src/debug/cfe-3.9.1.src/lib/AST/ASTContext.cpp:1489
#7  0x00007fffb06ef030 in
clang::ASTContext::getTypeInfoInChars(clang::QualType) const
(this=this@entry=0x7fff3c0c1e20, T=...)
    at /usr/src/debug/cfe-3.9.1.src/lib/AST/ASTContext.cpp:1496
#8  0x00007fffb06ef0b9 in
clang::ASTContext::getTypeSizeInChars(clang::QualType) const
(this=this@entry=0x7fff3c0c1e20, T=..., T@entry=...)
    at /usr/src/debug/cfe-3.9.1.src/lib/AST/ASTContext.cpp:1870
#9  0x00007fffb0b7804b in clang_Type_getSizeOf(CXType) (T=...) at
/usr/src/debug/cfe-3.9.1.src/tools/libclang/CXType.cpp:769
#10 0x00007fffb0df92fb in (anonymous
namespace)::Visitor::setDeclData<(CXCursorKind)2>(CXCursor,
KDevelop::ClassDeclaration*) const (this=this@entry=0x7fff8affc710, cursor=...,
decl=decl@entry=0x7fff8000d4a0) at
/usr/src/debug/kdevelop-5.1.0/languages/clang/duchain/builder.cpp:1044
#11 0x00007fffb0e144cc in (anonymous
namespace)::Visitor::createDeclarationCommon<(CXCursorKind)2,
KDevelop::ClassDeclaration> (id=..., cursor=..., this=0x7fff8affc710) at
/usr/src/debug/kdevelop-5.1.0/languages/clang/duchain/builder.cpp:396
#12 0x00007fffb0e144cc in (anonymous
namespace)::Visitor::createDeclaration<(CXCursorKind)2,
KDevelop::ClassDeclaration> (context=0x7fff8000ea80, id=..., cursor=...,
this=0x7fff8affc710) at
/usr/src/debug/kdevelop-5.1.0/languages/clang/duchain/builder.cpp:407
#13 0x00007fffb0e144cc in (anonymous
namespace)::Visitor::buildDeclaration<(CXCursorKind)2,
KDevelop::ClassDeclaration, true> (cursor=..., this=0x7fff8affc710) at
/usr/src/debug/kdevelop-5.1.0/languages/clang/duchain/builder.cpp:1144
#14 0x00007fffb0e144cc in (anonymous
namespace)::Visitor::dispatchCursor<(CXCursorKind)2, (Decision)1, (Decision)0>
(parent=..., cursor=..., this=0x7fff8affc710) at
/usr/src/debug/kdevelop-5.1.0/languages/clang/duchain/builder.cpp:907
#15 0x00007fffb0e144cc in (anonymous
namespace)::Visitor::dispatchCursor<(CXCursorKind)2, (Decision)1,
(Decision)2>(CXCursor, CXCursor) (this=this@entry=0x7fff8affc710, cursor=...,
parent=...) at
/usr/src/debug/kdevelop-5.1.0/languages/clang/duchain/builder.cpp:881
#16 0x00007fffb0e1629c in (anonymous
namespace)::Visitor::dispatchCursor<(CXCursorKind)2> (parent=..., cursor=...,
this=0x7fff8affc710)
    at /usr/src/debug/kdevelop-5.1.0/languages/clang/duchain/builder.cpp:869
#17 0x00007fffb0e1629c in (anonymous namespace)::visitCursor(CXCursor,
CXCursor, CXClientData) (cursor=..., parent=..., data=0x7fff8affc710)
    at /usr/src/debug/kdevelop-5.1.0/languages/clang/duchain/builder.cpp:1452
#18 0x00007fffb0b48fd5 in clang::cxcursor::CursorVisitor::Visit(CXCursor, bool)
(this=this@entry=0x7fff8affc4a0, Cursor=...,
CheckedRegionOfInterest=CheckedRegionOfInterest@entry=true) at
/usr/src/debug/cfe-3.9.1.src/tools/libclang/CIndex.cpp:208
#19 0x00007fffb0b4c9bd in
clang::cxcursor::CursorVisitor::handleDeclForVisitation(clang::Decl const*)
(this=this@entry=0x7fff8affc4a0, D=0x7fff3c1504f0)
    at /usr/src/debug/cfe-3.9.1.src/tools/libclang/CIndex.cpp:665
#20 0x00007fffb0b4cae6 in
clang::cxcursor::CursorVisitor::VisitDeclContext(clang::DeclContext*)
(this=this@entry=0x7fff8affc4a0, DC=0x7fff3c0ceb60)
    at /usr/src/debug/cfe-3.9.1.src/tools/libclang/CIndex.cpp:626
#21 0x00007fffb0b48cc0 in
clang::cxcursor::CursorVisitor::VisitChildren(CXCursor)
(this=this@entry=0x7fff8affc4a0, Cursor=...)
    at /usr/src/debug/cfe-3.9.1.src/tools/libclang/CIndex.cpp:531
#22 0x00007fffb0b51864 in clang_visitChildren(CXCursor, CXCursorVisitor,
CXClientData) (parent=..., visitor=visitor@entry=0x7fffb0e15290 <(anonymous
namespace)::visitCursor(CXCursor, CXCursor, CXClientData)>,
client_data=client_data@entry=0x7fff8affc710)
    at /usr/src/debug/cfe-3.9.1.src/tools/libclang/CIndex.cpp:4041
#23 0x00007fffb0e002e2 in (anonymous namespace)::Visitor::Visitor
(update=<optimized out>, includes=..., file=<optimized out>, tu=<optimized
out>, this=0x7fff8affc710) at
/usr/src/debug/kdevelop-5.1.0/languages/clang/duchain/builder.cpp:1378
#24 0x00007fffb0e002e2 in Builder::visit(CXTranslationUnitImpl*, void*,
QHash<void*, KDevelop::ReferencedTopDUContext> const&, bool) (tu=<optimized
out>, file=<optimized out>, includes=..., update=<optimized out>) at
/usr/src/debug/kdevelop-5.1.0/languages/clang/duchain/builder.cpp:1515
#25 0x00007fffb0e26525 in ClangHelpers::buildDUChain(void*, QMultiHash<void*,
Import> const&, ParseSession const&, KDevelop::TopDUContext::Features,
QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*,
std::function<bool ()> const&) (file=<optimized out>, imports=..., session=...,
features=<optimized out>, includedFiles=..., index=0x5555564c3970,
abortFunction=...) at
/usr/src/debug/kdevelop-5.1.0/languages/clang/duchain/clanghelpers.cpp:189
#26 0x00007fffb1087384 in
ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>,
ThreadWeaver::Thread*) (this=<optimized out>)
    at /usr/src/debug/kdevelop-5.1.0/languages/clang/clangparsejob.cpp:323
#27 0x00007fffee783baa in
ThreadWeaver::IdDecorator::run(QSharedPointer<ThreadWeaver::JobInterface>,
ThreadWeaver::Thread*) ()
    at /lib64/libKF5ThreadWeaver.so.5
#28 0x00007fffee7841b8 in
ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&,
ThreadWeaver::Thread*) ()
    at /lib64/libKF5ThreadWeaver.so.5
#29 0x00007fffee782d00 in
ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&,
ThreadWeaver::Thread*) ()
    at /lib64/libKF5ThreadWeaver.so.5
#30 0x00007fffee782810 in ThreadWeaver::Thread::run() () at
/lib64/libKF5ThreadWeaver.so.5
#31 0x00007ffff21489ca in QThreadPrivate::start(void*) () at
/lib64/libQt5Core.so.5
#32 0x00007fffea5416ca in start_thread () at /lib64/libpthread.so.0
#33 0x00007ffff153bf7f in clone () at /lib64/libc.so.6
(gdb) list
2924      // These asserts test different things.  A record has a definition
2925      // as soon as we begin to parse the definition.  That definition is
2926      // not a complete definition (which is what isDefinition() tests)
2927      // until we *finish* parsing the definition.
2928
2929      if (D->hasExternalLexicalStorage() && !D->getDefinition())
2930        getExternalSource()->CompleteType(const_cast<RecordDecl*>(D));
2931
2932      D = D->getDefinition();
2933      assert(D && "Cannot get layout of forward declarations!");
(gdb) p D
$1 = (const clang::RecordDecl *) 0x0
(gdb) up
#1  0x00007fffb084dcc4 in (anonymous
namespace)::EmptySubobjectMap::ComputeEmptySubobjectSizes (this=0x7fff8affacf0)
    at /usr/src/debug/cfe-3.9.1.src/lib/AST/RecordLayoutBuilder.cpp:192
192         const ASTRecordLayout &Layout =
Context.getASTRecordLayout(BaseDecl);
(gdb) p BaseDecl
$2 = (const clang::CXXRecordDecl *) 0x0
(gdb) p Base
$3 = (const clang::CXXBaseSpecifier &) @0x7fff3c150638: {Range = {B = {ID =
46}, E = {ID = 61}}, EllipsisLoc = {ID = 0}, Virtual = 1, BaseOfClass = 0,
  Access = 0, InheritConstructors = 0, BaseTypeInfo = 0x7fff3c150610}
(gdb) p Base.getType()
Cannot evaluate function -- may be inlined
(gdb) p (BaseTypeInfo*)0x7fff3c150610
No symbol "BaseTypeInfo" in current context.
(gdb) p (clang::TypeSourceInfo*)0x7fff3c150610
$4 = (clang::TypeSourceInfo *) 0x7fff3c150610
(gdb) p ((clang::TypeSourceInfo*)0x7fff3c150610)->getType()
Cannot evaluate function -- may be inlined
(gdb) p *((clang::TypeSourceInfo*)0x7fff3c150610)
$5 = {Ty = {Value = {Value = 140734201398448}}}
(gdb) up
#2  (anonymous namespace)::EmptySubobjectMap::EmptySubobjectMap
(Class=0x7fff3c1504f0, Context=..., this=0x7fff8affacf0)
    at /usr/src/debug/cfe-3.9.1.src/lib/AST/RecordLayoutBuilder.cpp:171
171           ComputeEmptySubobjectSizes();
(gdb) up
#3  clang::ASTContext::getASTRecordLayout (this=this@entry=0x7fff3c0c1e20,
D=<optimized out>, D@entry=0x7fff3c1504f0)
    at /usr/src/debug/cfe-3.9.1.src/lib/AST/RecordLayoutBuilder.cpp:2965
2965          EmptySubobjectMap EmptySubobjects(*this, RD);
(gdb) p this
$6 = (const clang::ASTContext * const) 0x7fff3c0c1e20
(gdb)

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

Reply via email to