Issue 138405
Summary [clang-tidy] Segmentation fault in clang::FormatASTNodeDiagnosticArgument
Labels clang, clang-tidy
Assignees
Reporter clee01
    - version
  - clang-tidy: 5.0.1
  - g++: 9.3.1
  - with -std=c++17
- backtrace
```
#0  0x00007fe61590b976 in clang::FormatASTNodeDiagnosticArgument(clang::DiagnosticsEngine::ArgumentKind, long, llvm::StringRef, llvm::StringRef, llvm::ArrayRef<std::pair<clang::DiagnosticsEngine::ArgumentKind, long> >, llvm::SmallVectorImpl<char>&, void*, llvm::ArrayRef<long>) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangAST.so.5
#1 0x00007fe6151bc32f in clang::Diagnostic::FormatDiagnostic(char const*, char const*, llvm::SmallVectorImpl<char>&) const () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangBasic.so.5
#2 0x00007fe614e7b94b in clang::tidy::ClangTidyDiagnosticConsumer::HandleDiagnostic(clang::DiagnosticsEngine::Level, clang::Diagnostic const&) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangTidy.so.5
#3 0x00007fe6151c0360 in clang::DiagnosticIDs::EmitDiag(clang::DiagnosticsEngine&, clang::DiagnosticIDs::Level) const () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangBasic.so.5
#4 0x00007fe6151c18f2 in clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangBasic.so.5
#5 0x00007fe6151ba134 in clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangBasic.so.5
#6 0x00007fe612c7b2d6 in clang::tidy::readability::RedundantMemberInitCheck::check(clang::ast_matchers::MatchFinder::MatchResult const&) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangTidyReadabilityModule.so.5
#7 0x00007fe6155b7c2f in clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::MatchVisitor::visitMatch(clang::ast_matchers::BoundNodes const&) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#8 0x00007fe6155d8c2b in clang::ast_matchers::internal::BoundNodesTreeBuilder::visitMatches(clang::ast_matchers::internal::BoundNodesTreeBuilder::Visitor*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#9 0x00007fe6155bbf45 in clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::matchWithFilter(clang::ast_type_traits::DynTypedNode const&) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#10 0x00007fe6155d0ec8 in clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#11 0x00007fe6155d196a in clang::RecursiveASTVisitor<clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor>::TraverseDeclContextHelper(clang::DeclContext*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#12 0x00007fe6155cff69 in clang::RecursiveASTVisitor<clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor>::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#13 0x00007fe6155d0ed3 in clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#14 0x00007fe6155cfa40 in clang::RecursiveASTVisitor<clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor>::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#15 0x00007fe6155d0ed3 in clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#16 0x00007fe6155d196a in clang::RecursiveASTVisitor<clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor>::TraverseDeclContextHelper(clang::DeclContext*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#17 0x00007fe6155d045a in clang::RecursiveASTVisitor<clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor>::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#18 0x00007fe6155d0ed3 in clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#19 0x00007fe6155d196a in clang::RecursiveASTVisitor<clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor>::TraverseDeclContextHelper(clang::DeclContext*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#20 0x00007fe6155d045a in clang::RecursiveASTVisitor<clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor>::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#21 0x00007fe6155d0ed3 in clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#22 0x00007fe6155d196a in clang::RecursiveASTVisitor<clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor>::TraverseDeclContextHelper(clang::DeclContext*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#23 0x00007fe6155d045a in clang::RecursiveASTVisitor<clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor>::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#24 0x00007fe6155d0ed3 in clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#25 0x00007fe6155d196a in clang::RecursiveASTVisitor<clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor>::TraverseDeclContextHelper(clang::DeclContext*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#26 0x00007fe6155cfab1 in clang::RecursiveASTVisitor<clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor>::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#27 0x00007fe6155d0ed3 in clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl(clang::Decl*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#28 0x00007fe6155d126b in clang::ast_matchers::MatchFinder::matchAST(clang::ASTContext&) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangASTMatchers.so.5
#29 0x00007fe610c4b078 in clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/../lib64/libclangFrontend.so.5
#30 0x00007fe60e8476cb in clang::ParseAST(clang::Sema&, bool, bool) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/../lib64/../lib64/libclangParse.so.5
#31 0x00007fe610c2429e in clang::FrontendAction::Execute() () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/../lib64/libclangFrontend.so.5
#32 0x00007fe610becc85 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/../lib64/libclangFrontend.so.5
#33 0x00007fe61299276a in clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) ()
   from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangTooling.so.5
#34 0x00007fe61298b9ec in clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) ()
   from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangTooling.so.5
#35 0x00007fe61299019e in clang::tooling::ToolInvocation::run() () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangTooling.so.5
#36 0x00007fe6129913e3 in clang::tooling::ClangTool::run(clang::tooling::ToolAction*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangTooling.so.5
#37 0x00007fe614e639e2 in clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&, clang::tooling::CompilationDatabase const&, llvm::ArrayRef<std::string>, clang::tidy::ProfileData*) () from /opt/rh/llvm-toolset-7/root/usr/bin/../lib64/libclangTidy.so.5
#38 0x0000000000429dc8 in clang::tidy::clangTidyMain(int, char const**) ()
#39 0x00007fe611611555 in __libc_start_main () from /usr/lib64/libc.so.6
#40 0x00000000004193be in _start ()
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to