[Lldb-commits] [PATCH] D102993: [lldb] Disable minimal import mode for RecordDecls that back FieldDecls
Jordan Rupprecht via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 10 12:58:04 PDT 2021
rupprecht added a comment.
This commit seems to be causing an LLDB crash. I'm still working on gathering info and reducing it, but maybe the crash reason is obvious to you given this stack trace:
$ lldb -b -o "b ChromeMain" -o "r" -o "v" -o "p chrome_main_delegate" ~/src/chromium/src/out/Default/chrome
assert.h assertion failed at llvm-project/clang/lib/AST/ASTImporter.cpp:1874 in llvm::Error clang::ASTNodeImporter::ImportDeclContext(clang::DeclContext *, bool): ToDC == ToD->getLexicalDeclContext() && ToDC->containsDecl(ToD)
...
Stack dump:
0. Program arguments: lldb -b -o "b ChromeMain" -o r -o v -o "p chrome_main_delegate" /home/rupprecht/src/chromium/src/out/Default/chrome
1. HandleCommand(command = "p chrome_main_delegate")^@
2. <lldb wrapper prefix>:45:51: current parser token ';'
3. <lldb wrapper prefix>:44:1: parsing function body '$__lldb_expr'
4. <lldb wrapper prefix>:44:1: in compound statement ('{}')
...
#13 0x000055646a128c66 clang::ASTNodeImporter::ImportDeclContext(clang::DeclContext*, bool) llvm-project/clang/lib/AST/ASTImporter.cpp:1874:9
#14 0x000055646a15cc0d clang::ASTImporter::ImportDefinition(clang::Decl*) llvm-project/clang/lib/AST/ASTImporter.cpp:9098:19
#15 0x000055646789e47d lldb_private::ClangASTImporter::ASTImporterDelegate::ImportImpl(clang::Decl*) llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp:916:25
#16 0x000055646a157235 clang::ASTImporter::Import(clang::Decl*) llvm-project/clang/lib/AST/ASTImporter.cpp:8412:8
#17 0x000055646789ac8a lldb_private::ClangASTImporter::CopyDecl(clang::ASTContext*, clang::Decl*) llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp:79:8
#18 0x00005564679c4205 lldb_private::ClangASTSource::CopyDecl(clang::Decl*) llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp:1720:3
#19 0x00005564679c415e lldb_private::ClangASTSource::FindExternalLexicalDecls(clang::DeclContext const*, llvm::function_ref<bool (clang::Decl::Kind)>, llvm::SmallVectorImpl<clang::Decl*>&) llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp:492:5
#20 0x00005564679a6b6a lldb_private::ClangASTSource::ClangASTSourceProxy::FindExternalLexicalDecls(clang::DeclContext const*, llvm::function_ref<bool (clang::Decl::Kind)>, llvm::SmallVectorImpl<clang::Decl*>&) llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h:223:7
#21 0x000055646a30d9b2 clang::ExternalASTSource::FindExternalLexicalDecls(clang::DeclContext const*, llvm::SmallVectorImpl<clang::Decl*>&) llvm-project/clang/include/clang/AST/ExternalASTSource.h:186:3
#22 0x000055646a30ae60 clang::DeclContext::LoadLexicalDeclsFromExternalStorage() const llvm-project/clang/lib/AST/DeclBase.cpp:1353:7
#23 0x000055646a30bec2 clang::DeclContext::buildLookup() llvm-project/clang/lib/AST/DeclBase.cpp:1582:32
#24 0x000055646a30bc4f clang::DeclContext::makeDeclVisibleInContextWithFlags(clang::NamedDecl*, bool, bool) llvm-project/clang/lib/AST/DeclBase.cpp:1859:5
#25 0x000055646a30bd99 clang::DeclContext::addDeclInternal(clang::Decl*) llvm-project/clang/lib/AST/DeclBase.cpp:1559:1
#26 0x000055646a12c1f0 clang::ASTNodeImporter::VisitTypedefNameDecl(clang::TypedefNameDecl*, bool) llvm-project/clang/lib/AST/ASTImporter.cpp:0:16
#27 0x000055646a12c4cd clang::ASTNodeImporter::VisitTypedefDecl(clang::TypedefDecl*) llvm-project/clang/lib/AST/ASTImporter.cpp:2552:10
#28 0x000055646a171e3a clang::declvisitor::Base<std::__u::add_pointer, clang::ASTNodeImporter, llvm::Expected<clang::Decl*> >::Visit(clang::Decl*) llvm-project/clang/include/clang/AST/DeclNodes.inc:335:1
#29 0x000055646a15619d clang::ASTImporter::ImportImpl(clang::Decl*) llvm-project/clang/lib/AST/ASTImporter.cpp:8240:19
#30 0x000055646789e55c lldb_private::ClangASTImporter::ASTImporterDelegate::ImportImpl(clang::Decl*) llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp:0:23
#31 0x000055646a157235 clang::ASTImporter::Import(clang::Decl*) llvm-project/clang/lib/AST/ASTImporter.cpp:8412:8
The class definition for the expression being evaluated can be found here: https://source.chromium.org/chromium/chromium/src/+/master:chrome/app/chrome_main.cc;l=85;drc=83bf8a5bbe7f9af4f4531b65662cfeb0c232b583
(It crashes in the same-ish w/o assertions too; this is just the more helpful stack trace :) )
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102993/new/
https://reviews.llvm.org/D102993
More information about the lldb-commits
mailing list