Skip to content

clang-tidy (llvm-project12) crashes while checking modernize-use-noexcept,modernize-use-uncaught-exceptions for a file #59893

Closed as not planned
@pnarsing

Description

@pnarsing

I'm running clang-tidy command in my infrastructure and seeing a crash .
PFA : preprocessed file for mwRegistration that is being run on for the command

mwRegistration_i.txt

Stack dump:
0.	Program arguments: clang-tidy -checks=-*,modernize-use-noexcept,modernize-use-uncaught-exceptions -p=/mathworks/devel/sbs/31/pnarsing.Bmain.j2158016.reduceLLVM/matlab/derived/glnxa64/modules/toolbox/vision/builtins/src/visionopen3d/libtooling/compile_commands.json **mwRegistration.cpp**
1.	/mathworks/devel/sbs/31/pnarsing.Bmain.j2158016.reduceLLVM/matlab/toolbox/vision/builtins/src/visionopen3d/mwRegistration.cpp:44:1: current parser token '}'
2.	/mathworks/devel/sbs/31/pnarsing.Bmain.j2158016.reduceLLVM/matlab/toolbox/vision/builtins/src/visionopen3d/mwRegistration.cpp:32:1: parsing namespace 'open3d'
3.	/mathworks/devel/sbs/31/pnarsing.Bmain.j2158016.reduceLLVM/matlab/toolbox/vision/builtins/src/visionopen3d/mwRegistration.cpp:33:1: parsing namespace 'open3d::pipelines'
4.	/mathworks/devel/sbs/31/pnarsing.Bmain.j2158016.reduceLLVM/matlab/toolbox/vision/builtins/src/visionopen3d/mwRegistration.cpp:34:1: parsing namespace 'open3d::pipelines::registration'
5.	/mathworks/devel/sbs/31/pnarsing.Bmain.j2158016.reduceLLVM/matlab/toolbox/vision/builtins/src/visionopen3d/mwRegistration.cpp:39:45: parsing function body 'open3d::pipelines::registration::GetRegistrationResultAndCorrespondencesUsingDistance'
6.	/mathworks/devel/sbs/31/pnarsing.Bmain.j2158016.reduceLLVM/matlab/toolbox/vision/builtins/src/visionopen3d/mwRegistration.cpp:39:45: in compound statement ('{}')
 #0 0x000000000229a3bd llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x229a3bd)
 #1 0x0000000002298654 llvm::sys::RunSignalHandlers() (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x2298654)
 #2 0x00000000022987ce SignalHandler(int) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x22987ce)
 #3 0x00007f121718f140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
 #4 0x0000000001947680 checkOpenMPLoop(llvm::omp::Directive, clang::Expr*, clang::Expr*, clang::Stmt*, clang::Sema&, (anonymous namespace)::DSAStackTy&, llvm::SmallDenseMap<clang::ValueDecl const*, clang::Expr const*, 4u, llvm::DenseMapInfo<clang::ValueDecl const*>, llvm::detail::DenseMapPair<clang::ValueDecl const*, clang::Expr const*> >&, clang::OMPLoopDirective::HelperExprs&) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x1947680)
 #5 0x0000000001949825 clang::Sema::ActOnOpenMPForDirective(llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, clang::SourceLocation, clang::SourceLocation, llvm::SmallDenseMap<clang::ValueDecl const*, clang::Expr const*, 4u, llvm::DenseMapInfo<clang::ValueDecl const*>, llvm::detail::DenseMapPair<clang::ValueDecl const*, clang::Expr const*> >&) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x1949825)
 #6 0x000000000195513c clang::Sema::ActOnOpenMPExecutableDirective(llvm::omp::Directive, clang::DeclarationNameInfo const&, llvm::omp::Directive, llvm::ArrayRef<clang::OMPClause*>, clang::Stmt*, clang::SourceLocation, clang::SourceLocation) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x195513c)
 #7 0x00000000012d27b8 clang::Parser::ParseOpenMPDeclarativeOrExecutableDirective(clang::Parser::ParsedStmtContext) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x12d27b8)
 #8 0x00000000012ee9ea clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x12ee9ea)
 #9 0x00000000012ef148 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x12ef148)
#10 0x00000000012f4551 clang::Parser::ParseCompoundStatementBody(bool) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x12f4551)
#11 0x00000000012f70ca clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x12f70ca)
#12 0x0000000001243ab4 clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x1243ab4)
#13 0x0000000001268ef2 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x1268ef2)
#14 0x000000000123e489 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x123e489)
#15 0x00000000012459c5 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (.localalias) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x12459c5)
#16 0x000000000127e2b0 clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) (.localalias) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x127e2b0)
#17 0x000000000127f01d clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x127f01d)
#18 0x000000000126a34e clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, clang::SourceLocation*) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x126a34e)
#19 0x00000000012453ba clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (.localalias) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x12453ba)
#20 0x000000000127e2b0 clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) (.localalias) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x127e2b0)
#21 0x000000000127f01d clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x127f01d)
#22 0x000000000126a34e clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, clang::SourceLocation*) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x126a34e)
#23 0x00000000012453ba clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (.localalias) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x12453ba)
#24 0x000000000127e2b0 clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) (.localalias) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x127e2b0)
#25 0x000000000127f01d clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x127f01d)
#26 0x000000000126a34e clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, clang::SourceLocation*) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x126a34e)
#27 0x00000000012453ba clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (.localalias) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x12453ba)
#28 0x0000000001246acb clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x1246acb)
#29 0x0000000001238831 clang::ParseAST(clang::Sema&, bool, bool) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x1238831)
#30 0x00000000010976f9 clang::FrontendAction::Execute() (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x10976f9)
#31 0x0000000001047a5d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x1047a5d)
#32 0x0000000000b8a9fa clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0xb8a9fa)
#33 0x0000000000b45fa8 clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&, clang::tooling::CompilationDatabase const&, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem>, bool, llvm::StringRef)::ActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0xb45fa8)
#34 0x0000000000b85448 clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0xb85448)
#35 0x0000000000b8856e clang::tooling::ToolInvocation::run() (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0xb8856e)
#36 0x0000000000b89bb4 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0xb89bb4)
#37 0x0000000000b50ac6 clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&, clang::tooling::CompilationDatabase const&, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem>, bool, llvm::StringRef) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0xb50ac6)
#38 0x0000000000563389 clang::tidy::clangTidyMain(int, char const**) (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x563389)
#39 0x00007f1216fdad0a __libc_start_main ./csu/../csu/libc-start.c:308:16
#40 0x000000000055ea5a _start (/mathworks/hub/3rdparty/internal/9002973/glnxa64/llvm-project12/release/bin/clang-tidy+0x55ea5a)
Segmentation fault

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-tidycrashPrefer [crash-on-valid] or [crash-on-invalid]worksformeResolved as "works for me"

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions