Issue |
112813
|
Summary |
[clang-tidy] Clang crashed during analyzing the cpp file
|
Labels |
clang,
clang-tidy
|
Assignees |
|
Reporter |
i80287
|
Got an error while running clang-tidy. Clang-tidy is executed by CodeChecker, flags and options are generated by the cmake with -DCMAKE_EXPORT_COMPILE_COMMANDS=1. The same error occurs when CodeChecker runs clang static analyzer
Stack dump:
0. Program arguments: /usr/lib/llvm-18/bin/clang-tidy /home/waste/Projects/cplusplus/algorithms/tf_idf_actrie/test_actrie.cpp --export-fixes /home/waste/Projects/cplusplus/algorithms/tests/cmake-build-codechecker/report_clang/fixit/test_actrie.cpp_clang-tidy_889ac94762fd440ca0328d94131f3632.yaml -- -Qunused-arguments -Wno-everything -x c++ --target=x86_64-pc-linux-gnu -D_GLIBCXX_CONCEPT_CHECKS -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_GLIBCXX_SANITIZE_VECTOR -D_LIBCPP_ENABLE_ASSERTIONS -fsanitize=address,undefined -O2 -g -std=c++20 -Wall -Wextra -Wcast-qual -Wpedantic -Wunused -Wshadow -Wnull-dereference -Wundef -Wwrite-strings -Wsign-conversion -Wsign-compare -Wsign-promo -Wconversion -Wmissing-noreturn -Wunreachable-code -Wcast-align -Wformat=2 -Wswitch-bool -Wswitch-default -Wswitch-enum -Wold-style-cast -Wdeprecated -Weffc++ -fstack-protector-strong -mshstk -Warray-bounds -Wshift-overflow -Wshift-sign-overflow -Wshorten-64-to-32 -Wthread-safety -fcolor-diagnostics -fansi-escape-codes -ftemplate-backtrace-limit=0 -U_GLIBCXX_USE_DEPRECATED -isystem /usr/include/c++/13 -isystem /usr/include/x86_64-linux-gnu/c++/13 -isystem /usr/include/c++/13/backward -isystem /usr/local/include -isystem /usr/include/x86_64-linux-gnu -isystem /usr/include
1. <eof> parser at end of file
2. While analyzing stack:
#0 Calling (anonymous namespace)::replacing_actrie_tests::test_replacing_actrie(const std::string_view (&)[5][2], std::string &, const std::string_view, const _Bool) at line /home/waste/Projects/cplusplus/algorithms/tf_idf_actrie/test_actrie.cpp:155:5 <Spelling=/home/waste/Projects/cplusplus/algorithms/tf_idf_actrie/test_actrie.cpp:155:12>
#1 Calling (anonymous namespace)::replacing_actrie_tests::test0() at line 448
#2 Calling main()
3. /home/waste/Projects/cplusplus/algorithms/tf_idf_actrie/test_actrie.cpp:118:44: Error evaluating statement
4. /home/waste/Projects/cplusplus/algorithms/tf_idf_actrie/test_actrie.cpp:118:44: Error evaluating statement
#0 0x0000785c835a63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:723:13
#1 0x0000785c835a44f9 llvm::sys::RunSignalHandlers() build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Signals.cpp:106:18
#2 0x0000785c835a6b00 SignalHandler build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:413:1
#3 0x0000785c82045320 (/lib/x86_64-linux-gnu/libc.so.6+0x45320)
#4 0x0000785c8cd0f1b7 getCanonicalDecl build-llvm/tools/clang/stage2-bins/clang/include/clang/AST/Decl.h:1274:40
#5 0x0000785c8cd0f1b7 clang::ento::MemRegionManager::getVarRegion(clang::VarDecl const*, clang::LocationContext const*) build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Core/MemRegion.cpp:1007:10
#6 0x0000785c8cd40a61 build-llvm/tools/clang/stage2-bins/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h:136:5
#7 0x0000785c8ccefe8b getType build-llvm/tools/clang/stage2-bins/clang/include/clang/AST/Expr.h:143:37
#8 0x0000785c8ccefe8b bindRequiredArrayElementToEnvironment build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:577:39
#9 0x0000785c8ccefe8b clang::ento::ExprEngine::handleConstructor(clang::Expr const*, clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:660:15
#10 0x0000785c8ccd32a5 clang::ento::ExprEngine::Visit(clang::Stmt const*, clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:0:7
#11 0x0000785c8ccd0e7a clang::ento::ExprEngine::ProcessStmt(clang::Stmt const*, clang::ento::ExplodedNode*) build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:1132:9
#12 0x0000785c8ccd0bb8 clang::ento::ExprEngine::processCFGElement(clang::CFGElement, clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*) build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:0:7
#13 0x0000785c8ccb7418 clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*, clang::ProgramPoint, clang::ento::WorkListUnit const&) build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:223:1
#14 0x0000785c8ccb6f6c _M_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:199:51
#15 0x0000785c8ccb6f6c get /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:470:21
#16 0x0000785c8ccb6f6c operator-> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:463:9
#17 0x0000785c8ccb6f6c operator() build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:140:12
#18 0x0000785c8ccb6f6c clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*, unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:163:29
#19 0x0000785c8d0d4529 release build-llvm/tools/clang/stage2-bins/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:232:9
#20 0x0000785c8d0d4529 ~IntrusiveRefCntPtr build-llvm/tools/clang/stage2-bins/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:196:27
#21 0x0000785c8d0d4529 ExecuteWorkList build-llvm/tools/clang/stage2-bins/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:190:5
#22 0x0000785c8d0d4529 RunPathSensitiveChecks build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:727:7
#23 0x0000785c8d0d4529 HandleCode build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:697:5
#24 0x0000785c8d0b451f empty build-llvm/tools/clang/stage2-bins/llvm/include/llvm/ADT/DenseMap.h:98:61
#25 0x0000785c8d0b451f begin build-llvm/tools/clang/stage2-bins/llvm/include/llvm/ADT/DenseMap.h:78:9
#26 0x0000785c8d0b451f begin build-llvm/tools/clang/stage2-bins/llvm/include/llvm/ADT/DenseSet.h:173:45
#27 0x0000785c8d0b451f HandleDeclsCallGraph build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:490:29
#28 0x0000785c8d0b451f runAnalysisOnTranslationUnit build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:557:5
#29 0x0000785c8d0b451f HandleTranslationUnit build-llvm/tools/clang/stage2-bins/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:612:3
#30 0x0000785c8ca42fbc operator++ /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_iterator.h:1111:2
#31 0x0000785c8ca42fbc clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) build-llvm/tools/clang/stage2-bins/clang/lib/Frontend/MultiplexConsumer.cpp:297:23
#32 0x0000785c8ab973d6 __normal_iterator /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_iterator.h:1077:20
#33 0x0000785c8ab973d6 begin /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_vector.h:874:16
#34 0x0000785c8ab973d6 finalize<std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback> >, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback> > > > > build-llvm/tools/clang/stage2-bins/clang/include/clang/Sema/TemplateInstCallback.h:54:16
#35 0x0000785c8ab973d6 clang::ParseAST(clang::Sema&, bool, bool) build-llvm/tools/clang/stage2-bins/clang/lib/Parse/ParseAST.cpp:183:3
#36 0x0000785c8ca0662c clang::FrontendAction::Execute() build-llvm/tools/clang/stage2-bins/clang/lib/Frontend/FrontendAction.cpp:1073:10
#37 0x0000785c8c9830b4 getPtr build-llvm/tools/clang/stage2-bins/llvm/include/llvm/Support/Error.h:279:12
#38 0x0000785c8c9830b4 operator bool build-llvm/tools/clang/stage2-bins/llvm/include/llvm/Support/Error.h:239:16
#39 0x0000785c8c9830b4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) build-llvm/tools/clang/stage2-bins/clang/lib/Frontend/CompilerInstance.cpp:1057:23
#40 0x0000785c8cbfa6b9 clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) build-llvm/tools/clang/stage2-bins/clang/lib/Tooling/Tooling.cpp:465:33
#41 0x0000587f55574ab3 ~__shared_count /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1070:6
#42 0x0000587f55574ab3 ~__shared_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1524:31
#43 0x0000587f55574ab3 runInvocation build-llvm/tools/clang/stage2-bins/clang-tools-extra/clang-tidy/ClangTidy.cpp:581:7
#44 0x0000785c8cbfa414 ~__shared_count /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1070:6
#45 0x0000785c8cbfa414 ~__shared_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1524:31
#46 0x0000785c8cbfa414 clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) build-llvm/tools/clang/stage2-bins/clang/lib/Tooling/Tooling.cpp:440:3
#47 0x0000785c8cbf917f clang::tooling::ToolInvocation::run() build-llvm/tools/clang/stage2-bins/clang/lib/Tooling/Tooling.cpp:425:10
#48 0x0000785c8cbfc1c1 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) build-llvm/tools/clang/stage2-bins/clang/lib/Tooling/Tooling.cpp:623:11
#49 0x0000587f55570d9b 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, bool, llvm::StringRef) build-llvm/tools/clang/stage2-bins/clang-tools-extra/clang-tidy/ClangTidy.cpp:0:8
#50 0x0000587f548f0c65 release build-llvm/tools/clang/stage2-bins/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:232:9
#51 0x0000587f548f0c65 ~IntrusiveRefCntPtr build-llvm/tools/clang/stage2-bins/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:196:27
#52 0x0000587f548f0c65 clang::tidy::clangTidyMain(int, char const**) build-llvm/tools/clang/stage2-bins/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:681:7
#53 0x0000785c8202a1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#54 0x0000785c8202a28b call_init ./csu/../csu/libc-start.c:128:20
#55 0x0000785c8202a28b __libc_start_main ./csu/../csu/libc-start.c:347:5
#56 0x0000587f548ebfe5 _start (/usr/lib/llvm-18/bin/clang-tidy+0x6fafe5)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs