llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.15k stars 12.03k forks source link

Crash upon trying to display object member. #50492

Open 19f04fc4-9590-484e-9a0b-3ed40b7847b8 opened 3 years ago

19f04fc4-9590-484e-9a0b-3ed40b7847b8 commented 3 years ago
Bugzilla Link 51148
Version 12.0
OS MacOS X
CC @JDevlieghere

Extended Description

(lldb) f 4 frame #​4: 0x0000000119818e1b libgnc-app-utils.dylib`GncOption::GncOption<scm_unused_struct*, 0>(this=0x0000000102f05540, section="__reg", name="query", key="", doc_string="query", value=0x0000000000000304, ui_type=INTERNAL) at gnc-option.cpp:45:1 42 ValueType value, GncOptionUIType ui_type) : 43 m_option{std::make_unique(std::move(GncOptionValue { 44 section, name, key, doc_string, value, ui_type}))} -> 45 { 46 } 47 48 template ValueType (lldb) p m_option PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump:

  1. Program arguments: /Applications/Xcode.app/Contents/Developer/usr/bin/lldb /Users/john/Development/Gnucash-Build/Gnucash-master-git-10.15-x86_64/inst/bin/guile 0 lldb 0x00000001099fade5 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37 1 lldb 0x00000001099fa4e5 llvm::sys::RunSignalHandlers() + 85 2 lldb 0x00000001099fb646 SignalHandler(int) + 262 3 libsystem_platform.dylib 0x00007fff20387d7d _sigtramp + 29 4 libsystem_malloc.dylib 0x00007fff2016a937 small_malloc_should_clear + 259 5 LLDB 0x0000000112d0c2ad IsStructurallyEquivalent(clang::StructuralEquivalenceContext&, clang::RecordDecl, clang::RecordDecl) + 1629 6 LLDB 0x0000000112d08a27 clang::StructuralEquivalenceContext::Finish() + 199 7 LLDB 0x0000000112d0882a clang::StructuralEquivalenceContext::IsEquivalent(clang::Decl, clang::Decl) + 26 8 LLDB 0x0000000112cdc42f clang::ASTNodeImporter::VisitRecordDecl(clang::RecordDecl) + 1919 9 LLDB 0x0000000112cf76d1 clang::declvisitor::Base<std::__1::add_pointer, clang::ASTNodeImporter, llvm::Expected<clang::Decl> >::Visit(clang::Decl) + 113 10 LLDB 0x0000000112cf7656 clang::ASTImporter::ImportImpl(clang::Decl) + 22 11 LLDB 0x000000010f5d320c lldb_private::ClangASTImporter::ASTImporterDelegate::ImportImpl(clang::Decl) + 1068 12 LLDB 0x0000000112cf8c97 clang::ASTImporter::Import(clang::Decl) + 935 13 LLDB 0x0000000112cf7fad clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected >::Visit(clang::Type const) + 93 14 LLDB 0x0000000112cf7d3c clang::ASTImporter::Import(clang::QualType) + 236 15 LLDB 0x0000000112cd5296 clang::ASTNodeImporter::VisitPointerType(clang::PointerType const) + 38 16 LLDB 0x0000000112cf81bd clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected >::Visit(clang::Type const) + 621 17 LLDB 0x0000000112cf7d3c clang::ASTImporter::Import(clang::QualType) + 236 18 LLDB 0x0000000112cd3716 llvm::Expected clang::ASTNodeImporter::import(clang::TemplateArgument const&) + 86 19 LLDB 0x0000000112ce804b clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(clang::ClassTemplateSpecializationDecl) + 363 20 LLDB 0x0000000112cf76e4 clang::declvisitor::Base<std::1::add_pointer, clang::ASTNodeImporter, llvm::Expected<clang::Decl> >::Visit(clang::Decl) + 132 21 LLDB 0x0000000112cf7656 clang::ASTImporter::ImportImpl(clang::Decl) + 22 22 LLDB 0x000000010f5d320c lldb_private::ClangASTImporter::ASTImporterDelegate::ImportImpl(clang::Decl) + 1068 23 LLDB 0x0000000112cf8c97 clang::ASTImporter::Import(clang::Decl) + 935 24 LLDB 0x0000000112cf7fad clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected >::Visit(clang::Type const) + 93 25 LLDB 0x0000000112cf7d3c clang::ASTImporter::Import(clang::QualType) + 236 26 LLDB 0x0000000112cd3716 llvm::Expected clang::ASTNodeImporter::import(clang::TemplateArgument const&) + 86 27 LLDB 0x0000000112cd3397 clang::ASTNodeImporter::ImportTemplateArguments(clang::TemplateArgument const, unsigned int, llvm::SmallVectorImpl&) + 87 28 LLDB 0x0000000112cd3966 llvm::Expected clang::ASTNodeImporter::import(clang::TemplateArgument const&) + 678 29 LLDB 0x0000000112ce804b clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(clang::ClassTemplateSpecializationDecl) + 363 30 LLDB 0x0000000112cf76e4 clang::declvisitor::Base<std::1::add_pointer, clang::ASTNodeImporter, llvm::Expected<clang::Decl> >::Visit(clang::Decl) + 132 31 LLDB 0x0000000112cf7656 clang::ASTImporter::ImportImpl(clang::Decl) + 22 32 LLDB 0x000000010f5d320c lldb_private::ClangASTImporter::ASTImporterDelegate::ImportImpl(clang::Decl) + 1068 33 LLDB 0x0000000112cf8c97 clang::ASTImporter::Import(clang::Decl) + 935 34 LLDB 0x0000000112cf7fad clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected >::Visit(clang::Type const) + 93 35 LLDB 0x0000000112cf7d3c clang::ASTImporter::Import(clang::QualType) + 236 36 LLDB 0x0000000112cd3716 llvm::Expected clang::ASTNodeImporter::import(clang::TemplateArgument const&) + 86 37 LLDB 0x0000000112ce804b clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(clang::ClassTemplateSpecializationDecl) + 363 38 LLDB 0x0000000112cf76e4 clang::declvisitor::Base<std::__1::add_pointer, clang::ASTNodeImporter, llvm::Expected<clang::Decl> >::Visit(clang::Decl) + 132 39 LLDB 0x0000000112cf7656 clang::ASTImporter::ImportImpl(clang::Decl) + 22 40 LLDB 0x000000010f5d320c lldb_private::ClangASTImporter::ASTImporterDelegate::ImportImpl(clang::Decl) + 1068 41 LLDB 0x0000000112cf8c97 clang::ASTImporter::Import(clang::Decl) + 935 42 LLDB 0x0000000112cf7fad clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected >::Visit(clang::Type const) + 93 43 LLDB 0x0000000112cf7d3c clang::ASTImporter::Import(clang::QualType) + 236 44 LLDB 0x0000000112cda74d clang::ASTNodeImporter::VisitTypedefNameDecl(clang::TypedefNameDecl, bool) + 221 45 LLDB 0x0000000112cf7a0b clang::declvisitor::Base<std::1::add_pointer, clang::ASTNodeImporter, llvm::Expected<clang::Decl> >::Visit(clang::Decl) + 939 46 LLDB 0x0000000112cf7656 clang::ASTImporter::ImportImpl(clang::Decl) + 22 47 LLDB 0x000000010f5d320c lldb_private::ClangASTImporter::ASTImporterDelegate::ImportImpl(clang::Decl) + 1068 48 LLDB 0x0000000112cf8c97 clang::ASTImporter::Import(clang::Decl) + 935 49 LLDB 0x000000010f5cf2d9 lldb_private::ClangASTImporter::CopyDecl(clang::ASTContext, clang::Decl) + 105 50 LLDB 0x000000010f5d2edf lldb_private::ClangASTImporter::ASTImporterDelegate::ImportImpl(clang::Decl) + 255 51 LLDB 0x0000000112cf8c97 clang::ASTImporter::Import(clang::Decl) + 935 52 LLDB 0x0000000112cf825c clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected >::Visit(clang::Type const) + 780 53 LLDB 0x0000000112cf7d3c clang::ASTImporter::Import(clang::QualType) + 236 54 LLDB 0x000000010f5ced8d lldb_private::ClangASTImporter::CopyType(lldb_private::TypeSystemClang&, lldb_private::CompilerType const&) + 157 55 LLDB 0x000000010f5cf9ca lldb_private::ClangASTImporter::DeportType(lldb_private::TypeSystemClang&, lldb_private::CompilerType const&) + 666 56 LLDB 0x000000010f5e33ff lldb_private::ClangExpressionDeclMap::AddPersistentVariable(clang::NamedDecl const*, lldb_private::ConstString, lldb_private::TaggedASTType<0u>, bool, bool) + 655 57 LLDB 0x000000010f610356 IRForTarget::CreateResultVariable(llvm::Function&) + 4054 58 LLDB 0x000000010f615704 IRForTarget::runOnModule(llvm::Module&) + 868 59 LLDB 0x000000010f5f52a9 lldb_private::ClangExpressionParser::DoPrepareForExecution(unsigned long long&, unsigned long long&, std::1::shared_ptr&, lldb_private::ExecutionContext&, bool&, lldb_private::ExecutionPolicy) + 1193 60 LLDB 0x000000010efc5207 lldb_private::ExpressionParser::PrepareForExecution(unsigned long long&, unsigned long long&, std::1::shared_ptr&, lldb_private::ExecutionContext&, bool&, lldb_private::ExecutionPolicy) + 39 61 LLDB 0x000000010f60858f lldb_private::ClangUserExpression::TryParse(lldb_private::DiagnosticManager&, lldb_private::ExecutionContextScope*, lldb_private::ExecutionContext&, lldb_private::ExecutionPolicy, bool, bool) + 527 62 LLDB 0x000000010f6089ad lldb_private::ClangUserExpression::Parse(lldb_private::DiagnosticManager&, lldb_private::ExecutionContext&, lldb_private::ExecutionPolicy, bool, bool) + 285 63 LLDB 0x000000010efdf8db lldb_private::UserExpression::Evaluate(lldb_private::ExecutionContext&, lldb_private::EvaluateExpressionOptions const&, llvm::StringRef, llvm::StringRef, std::1::shared_ptr&, lldb_private::Status&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, lldb_private::ValueObject) + 2427 64 LLDB 0x000000010f0e03ec lldb_private::Target::EvaluateExpression(llvm::StringRef, lldb_private::ExecutionContextScope, std::1::shared_ptr&, lldb_private::EvaluateExpressionOptions const&, std::__1::basic_string<char, std::1::char_traits, std::__1::allocator >, lldb_private::ValueObject) + 636 65 LLDB 0x000000010f560605 lldb_private::CommandObjectExpression::EvaluateExpression(llvm::StringRef, lldb_private::Stream&, lldb_private::Stream&, lldb_private::CommandReturnObject&) + 549 66 LLDB 0x000000010f5615a0 lldb_private::CommandObjectExpression::DoExecute(llvm::StringRef, lldb_private::CommandReturnObject&) + 1552 67 LLDB 0x000000010f01b672 lldb_private::CommandObjectRaw::Execute(char const, lldb_private::CommandReturnObject&) + 418 68 LLDB 0x000000010f011b81 lldb_private::CommandInterpreter::HandleCommand(char const, lldb_private::LazyBool, lldb_private::CommandReturnObject&, lldb_private::ExecutionContext, bool, bool) + 2753 69 LLDB 0x000000010f015eac lldb_private::CommandInterpreter::IOHandlerInputComplete(lldb_private::IOHandler&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) + 620 70 LLDB 0x000000010ef534a2 lldb_private::IOHandlerEditline::Run() + 338 71 LLDB 0x000000010ef3948f lldb_private::Debugger::RunIOHandlers() + 143 72 LLDB 0x000000010f01714e lldb_private::CommandInterpreter::RunCommandInterpreter(lldb_private::CommandInterpreterRunOptions&) + 158 73 LLDB 0x000000010ecf8076 lldb::SBDebugger::RunCommandInterpreter(bool, bool) + 214 74 lldb 0x00000001099e2969 Driver::MainLoop() + 2857 75 lldb 0x00000001099e42ce main + 1982 76 libdyld.dylib 0x00007fff2035df5d start + 1 Segmentation fault: 11

lldb --version lldb-1205.0.28.2 Apple Swift version 5.4.2 (swiftlang-1205.0.28.2 clang-1205.0.19.57)

macOS 11.4

19f04fc4-9590-484e-9a0b-3ed40b7847b8 commented 3 years ago

Another segfault at a different location in IsStructurallyEquivalent. The rest of the stack looks the same.

Process 24007 resuming Set option General:Start Date to (absolute . 1546329600) Setting option "General" "Start Date" to (absolute . 1546329600) Set option General:End Date to (absolute . 1609488000) Setting option "General" "End Date" to (absolute . 1609488000) Found value 1546329600 for option "General" "Start Date" Found value 1609488000 for option "General" "End Date" Process 24007 stopped