[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Wed May 29 15:28:01 PDT 2024


Michael137 wrote:

Unfortunately this breaks `TestCPPAccelerator.py` on the macOS buildbots: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/4788/execution/node/97/log/

```
Ran command:
"log enable dwarf lookups -f/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/lldb-build/lldb-test-build.noindex/lang/cpp/accelerator-table/TestCPPAccelerator.test_dwarf/dwarf.log"

Got output:


runCmd: frame variable inner_d

Assertion failed: (DD && "queried property of class with no definition"), function data, file DeclCXX.h, line 464.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	HandleCommand(command = "frame variable inner_d")
```

The stacktrace I got when locally reproducing this:
```
Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x18e0a1540 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x18e0d9bcc pthread_kill + 288
2   libsystem_c.dylib             	       0x18dfe6964 __abort + 136
3   libsystem_c.dylib             	       0x18dfe68dc abort + 140
4   libsystem_c.dylib             	       0x18dfe5bc8 __assert_rtn + 284
5   liblldb.19.0.0git.dylib       	       0x31fd217c0 clang::CXXRecordDecl::data() const + 112
6   liblldb.19.0.0git.dylib       	       0x31fe9cb8c clang::CXXRecordDecl::hasUserDeclaredMoveConstructor() const + 24
7   liblldb.19.0.0git.dylib       	       0x31fe7edf8 lldb_private::TypeSystemClang::CompleteTagDeclarationDefinition(lldb_private::CompilerType const&) + 256
8   liblldb.19.0.0git.dylib       	       0x31fd142a8 DWARFASTParserClang::CompleteRecordType(lldb_private::plugin::dwarf::DWARFDIE const&, lldb_private::Type*, lldb_private::CompilerType&) + 1024
9   liblldb.19.0.0git.dylib       	       0x31fd14f4c DWARFASTParserClang::CompleteTypeFromDWARF(lldb_private::plugin::dwarf::DWARFDIE const&, lldb_private::Type*, lldb_private::CompilerType&) + 316
10  liblldb.19.0.0git.dylib       	       0x31fd9cc78 lldb_private::plugin::dwarf::SymbolFileDWARF::CompleteType(lldb_private::CompilerType&) + 1160
11  liblldb.19.0.0git.dylib       	       0x31fdf3a64 lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompleteType(lldb_private::CompilerType&)::$_0::operator()(lldb_private::plugin::dwarf::SymbolFileDWARF*) const + 72
12  liblldb.19.0.0git.dylib       	       0x31fdf3a10 decltype(std::declval<lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompleteType(lldb_private::CompilerType&)::$_0&>()(std::declval<lldb_private::plugin::dwarf::SymbolFileDWARF*>())) std::__1::__invoke[abi:nn180100]<lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompleteType(lldb_private::CompilerType&)::$_0&, lldb_private::plugin::dwarf::SymbolFileDWARF*>(lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompleteType(lldb_private::CompilerType&)::$_0&, lldb_private::plugin::dwarf::SymbolFileDWARF*&&) + 36
13  liblldb.19.0.0git.dylib       	       0x31fdf39bc lldb_private::IterationAction std::__1::__invoke_void_return_wrapper<lldb_private::IterationAction, false>::__call[abi:nn180100]<lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompleteType(lldb_private::CompilerType&)::$_0&, lldb_private::plugin::dwarf::SymbolFileDWARF*>(lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompleteType(lldb_private::CompilerType&)::$_0&, lldb_private::plugin::dwarf::SymbolFileDWARF*&&) + 32
14  liblldb.19.0.0git.dylib       	       0x31fdf3990 std::__1::__function::__alloc_func<lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompleteType(lldb_private::CompilerType&)::$_0, std::__1::allocator<lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompleteType(lldb_private::CompilerType&)::$_0>, lldb_private::IterationAction (lldb_private::plugin::dwarf::SymbolFileDWARF*)>::operator()[abi:nn180100](lldb_private::plugin::dwarf::SymbolFileDWARF*&&) + 36
15  liblldb.19.0.0git.dylib       	       0x31fdf28a4 std::__1::__function::__func<lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompleteType(lldb_private::CompilerType&)::$_0, std::__1::allocator<lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompleteType(lldb_private::CompilerType&)::$_0>, lldb_private::IterationAction (lldb_private::plugin::dwarf::SymbolFileDWARF*)>::operator()(lldb_private::plugin::dwarf::SymbolFileDWARF*&&) + 36
16  liblldb.19.0.0git.dylib       	       0x31fde1f84 std::__1::__function::__value_func<lldb_private::IterationAction (lldb_private::plugin::dwarf::SymbolFileDWARF*)>::operator()[abi:nn180100](lldb_private::plugin::dwarf::SymbolFileDWARF*&&) const + 76
17  liblldb.19.0.0git.dylib       	       0x31fde1f2c std::__1::function<lldb_private::IterationAction (lldb_private::plugin::dwarf::SymbolFileDWARF*)>::operator()(lldb_private::plugin::dwarf::SymbolFileDWARF*) const + 36
18  liblldb.19.0.0git.dylib       	       0x31fdde658 lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::ForEachSymbolFile(std::__1::function<lldb_private::IterationAction (lldb_private::plugin::dwarf::SymbolFileDWARF*)>) + 128
19  liblldb.19.0.0git.dylib       	       0x31fdde58c lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CompleteType(lldb_private::CompilerType&) + 112
20  liblldb.19.0.0git.dylib       	       0x31fe9f5cc lldb_private::TypeSystemClang::CompleteTagDecl(clang::TagDecl*) + 120
21  liblldb.19.0.0git.dylib       	       0x321364718 lldb_private::ClangExternalASTSourceCallbacks::CompleteType(clang::TagDecl*) + 36
22  liblldb.19.0.0git.dylib       	       0x31fe82b94 GetCompleteQualType(clang::ASTContext*, clang::QualType, bool) + 516
23  liblldb.19.0.0git.dylib       	       0x31fe8e1f4 lldb_private::TypeSystemClang::GetNumChildren(void*, bool, lldb_private::ExecutionContext const*) + 436
24  liblldb.19.0.0git.dylib       	       0x31f2f7f88 lldb_private::CompilerType::GetNumChildren(bool, lldb_private::ExecutionContext const*) const + 144
25  liblldb.19.0.0git.dylib       	       0x31fe8e60c lldb_private::TypeSystemClang::GetNumChildren(void*, bool, lldb_private::ExecutionContext const*) + 1484
26  liblldb.19.0.0git.dylib       	       0x31f2f7f88 lldb_private::CompilerType::GetNumChildren(bool, lldb_private::ExecutionContext const*) const + 144
27  liblldb.19.0.0git.dylib       	       0x31f0f59cc lldb_private::ValueObjectVariable::CalculateNumChildren(unsigned int) + 232
28  liblldb.19.0.0git.dylib       	       0x31f0cb4d0 lldb_private::ValueObject::GetNumChildren(unsigned int) + 260
29  liblldb.19.0.0git.dylib       	       0x31f1048c8 lldb_private::FormatManager::ShouldPrintAsOneLiner(lldb_private::ValueObject&) + 380
30  liblldb.19.0.0git.dylib       	       0x31f0f8c4c lldb_private::DataVisualization::ShouldPrintAsOneLiner(lldb_private::ValueObject&) + 28
31  liblldb.19.0.0git.dylib       	       0x31f138bdc lldb_private::ValueObjectPrinter::PrintChildrenIfNeeded(bool, bool) + 244
32  liblldb.19.0.0git.dylib       	       0x31f138018 lldb_private::ValueObjectPrinter::PrintValueObject() + 412
33  liblldb.19.0.0git.dylib       	       0x31f0d41cc lldb_private::ValueObject::Dump(lldb_private::Stream&, lldb_private::DumpValueObjectOptions const&) + 76
34  liblldb.19.0.0git.dylib       	       0x32115d344 CommandObjectFrameVariable::DoExecute(lldb_private::Args&, lldb_private::CommandReturnObject&) + 2316
35  liblldb.19.0.0git.dylib       	       0x31f26f4b0 lldb_private::CommandObjectParsed::Execute(char const*, lldb_private::CommandReturnObject&) + 856
36  liblldb.19.0.0git.dylib       	       0x31f2411f4 lldb_private::CommandInterpreter::HandleCommand(char const*, lldb_private::LazyBool, lldb_private::CommandReturnObject&, bool) + 3312
37  liblldb.19.0.0git.dylib       	       0x31ec247d4 lldb::SBCommandInterpreter::HandleCommand(char const*, lldb::SBExecutionContext&, lldb::SBCommandReturnObject&, bool) + 432 (SBCommandInterpreter.cpp:194)
38  liblldb.19.0.0git.dylib       	       0x31ec24574 lldb::SBCommandInterpreter::HandleCommand(char const*, lldb::SBCommandReturnObject&, bool) + 184 (SBCommandInterpreter.cpp:176)
39  liblldb.19.0.0git.dylib       	       0x31ee8a348 _wrap_SBCommandInterpreter_HandleCommand__SWIG_0(_object*, long, _object**) + 732 (LLDBWrapPython.cpp:16242)
40  liblldb.19.0.0git.dylib       	       0x31eda5fc0 _wrap_SBCommandInterpreter_HandleCommand(_object*, _object*) + 820 (LLDBWrapPython.cpp:16469)
```

Let me know if you need help reproducing this on macOS!

https://github.com/llvm/llvm-project/pull/92328


More information about the lldb-commits mailing list