Skip to content

MrDocs crashes when extract-all: false #1195

@2LoS

Description

@2LoS

I'm having a problem with MrDocs (v0.8.0), which seems to occur only when the option extract-all is set to false. In this case, when I run the program, it crashes with the following error.

Stack dump:
0.      <eof> parser at end of file
 #0 0x00000000036acb2d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0x36acb2d)
 #1 0x00000000036a9b47 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #2 0x00000000037f7180 __restore_rt libc_sigaction.o:0:0
 #3 0x00000000009faef6 std::_Hashtable<mrdocs::UndocumentedSymbol, mrdocs::UndocumentedSymbol, std::allocator<mrdocs::UndocumentedSymbol>, std::__detail::_Identity, mrdocs::UndocumentedSymbolEqual, mrdocs::UndocumentedSymbolHasher, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true>>::erase(std::__detail::_Node_const_iterator<mrdocs::UndocumentedSymbol, true, true>) (.isra.0) ASTVisitor.cpp:0:0
 #4 0x0000000000a1a959 mrdocs::Expected<void, mrdocs::Error> mrdocs::ASTVisitor::checkUndocumented<mrdocs::RecordSymbol, clang::CXXRecordDecl>(mrdocs::SymbolID const&, clang::CXXRecordDecl const*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xa1a959)
 #5 0x0000000000a1af8c mrdocs::Expected<mrdocs::ASTVisitor::upsertResult<std::conditional<same_as<mrdocs::RecordSymbol, void>, mrdocs::InfoTypeFor<clang::CXXRecordDecl>::type, mrdocs::RecordSymbol>::type>, mrdocs::Error> mrdocs::ASTVisitor::upsert<mrdocs::RecordSymbol, clang::CXXRecordDecl>(clang::CXXRecordDecl const*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xa1af8c)
 #6 0x0000000000a42aad mrdocs::Symbol* mrdocs::ASTVisitor::traverse<void, clang::CXXRecordDecl>(clang::CXXRecordDecl const*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xa42aad)
 #7 0x0000000000a2f8e8 mrdocs::Symbol* mrdocs::ASTVisitor::traverse<void, clang::Decl>(clang::Decl const*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xa2f8e8)
 #8 0x0000000000a401db void mrdocs::ASTVisitor::traverseMembers<mrdocs::NamespaceSymbol, clang::NamespaceDecl>(mrdocs::NamespaceSymbol&, clang::NamespaceDecl const*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xa401db)
 #9 0x0000000000a4056d mrdocs::Symbol* mrdocs::ASTVisitor::traverse<void, clang::NamespaceDecl>(clang::NamespaceDecl const*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xa4056d)
#10 0x0000000000a2f8e8 mrdocs::Symbol* mrdocs::ASTVisitor::traverse<void, clang::Decl>(clang::Decl const*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xa2f8e8)
#11 0x0000000000a2f9cb void mrdocs::ASTVisitor::traverseMembers<mrdocs::NamespaceSymbol, clang::TranslationUnitDecl>(mrdocs::NamespaceSymbol&, clang::TranslationUnitDecl const*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xa2f9cb)
#12 0x0000000000a382e9 mrdocs::Symbol* mrdocs::ASTVisitor::traverse<void, clang::TranslationUnitDecl>(clang::TranslationUnitDecl const*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xa382e9)
#13 0x0000000000a383dc mrdocs::ASTVisitor::build() (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xa383dc)
#14 0x00000000009dbe00 mrdocs::ASTVisitorConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0x9dbe00)
#15 0x0000000000c7529c clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xc7529c)
#16 0x0000000000ba5ca3 clang::FrontendAction::Execute() (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xba5ca3)
#17 0x0000000000b23b23 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xb23b23)
#18 0x0000000000ad8c8b clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xad8c8b)
#19 0x0000000000ad0c0a clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xad0c0a)
#20 0x0000000000ad41d1 clang::tooling::ToolInvocation::run() (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xad41d1)
#21 0x0000000000ad6afc clang::tooling::ClangTool::run(clang::tooling::ToolAction*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0xad6afc)
#22 0x00000000007f0c96 mrdocs::CorpusImpl::build(std::shared_ptr<mrdocs::ConfigImpl const> const&, mrdocs::MrDocsCompilationDatabase const&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const CorpusImpl.cpp:0:0
#23 0x00000000007f1594 mrdocs::any_callable<void ()>::any_callable<mrdocs::CorpusImpl::build(std::shared_ptr<mrdocs::ConfigImpl const> const&, mrdocs::MrDocsCompilationDatabase const&)::'lambda'()>(mrdocs::CorpusImpl::build(std::shared_ptr<mrdocs::ConfigImpl const> const&, mrdocs::MrDocsCompilationDatabase const&)::'lambda'()&&)::impl::invoke() CorpusImpl.cpp:0:0
#24 0x00000000008c5f77 std::_Function_handler<void (), mrdocs::TaskGroup::post(mrdocs::any_callable<void ()>)::'lambda'()>::_M_invoke(std::_Any_data const&) ThreadPool.cpp:0:0
#25 0x00000000008c3361 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>>::_M_invoke(std::_Any_data const&) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0x8c3361)
#26 0x00000000008c3a0d std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0x8c3a0d)
#27 0x0000000003824d2b __pthread_once_slow.isra.0 pthread_once.o:0:0
#28 0x0000000003824d99 ___pthread_once (/usr/local/MrDocs-0.8.0/bin/mrdocs+0x3824d99)
#29 0x00000000008c3b7c std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>::_M_complete_async() (/usr/local/MrDocs-0.8.0/bin/mrdocs+0x8c3b7c)
#30 0x00000000008c3733 std::_Function_handler<void (), std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()>::_M_invoke(std::_Any_data const&) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0x8c3733)
#31 0x00000000036280bd llvm::StdThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/usr/local/MrDocs-0.8.0/bin/mrdocs+0x36280bd)
#32 0x0000000003628d27 void* llvm::thread::ThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::'lambda'()>>(void*) ThreadPool.cpp:0:0
#33 0x0000000003820fde start_thread pthread_create.o:0:0
#34 0x000000000387103c __clone3 (/usr/local/MrDocs-0.8.0/bin/mrdocs+0x387103c)
Segmentation fault         (core dumped) mrdocs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions