| Issue |
182346
|
| Summary |
[clang-tidy] Crash when analyzing file
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
pozemka
|
```
Stack dump:
0. Program arguments: /usr/bin/clang-tidy -p=/home/uni/projects/craftsdwarfship/build/Desktop_clang-Debug --config-file=../../.clang-tidy /home/uni/projects/craftsdwarfship/systems/heroes-ai/party_in_quest_location2.cpp
1. <eof> parser at end of file
2. While analyzing stack:
#0 Calling boost::pfr::detail::for_each_field_impl(const struct CDS::Attributes &, class (lambda at /home/uni/projects/craftsdwarfship/systems/heroes-ai/party_in_quest_location2.cpp:144:43) &&, std::index_sequence<0UL, 1UL, 2UL, 3UL>, struct std::is_rvalue_reference<const struct CDS::Attributes &>) at line /home/uni/projects/craftsdwarfship/build/Desktop_clang-Debug/vcpkg_installed/x64-linux/include/boost/pfr/detail/for_each_field.hpp:30:9
#1 Calling boost::pfr::detail::for_each_field(const struct CDS::Attributes &, class (lambda at /home/uni/projects/craftsdwarfship/systems/heroes-ai/party_in_quest_location2.cpp:144:43) &&) at line /home/uni/projects/craftsdwarfship/build/Desktop_clang-Debug/vcpkg_installed/x64-linux/include/boost/pfr/core.hpp:258:12
#2 Calling boost::pfr::for_each_field(const struct CDS::Attributes &, class (lambda at /home/uni/projects/craftsdwarfship/systems/heroes-ai/party_in_quest_location2.cpp:144:43) &&) at line 144
#3 Calling CDS::(anonymous namespace)::rewardFight(entt::registry &, const GameState &, SystemContext &, std::span<const entt::entity>, const CombatSimulationState &)::(anonymous class)::operator()(const entt::entity &) at line /usr/bin/../lib64/gcc/x86_64-suse-linux/15/../../../../include/c++/15/bits/invoke.h:63:14
#4 Calling std::__invoke_impl(__invoke_other, class (lambda at /home/uni/projects/craftsdwarfship/systems/heroes-ai/party_in_quest_location2.cpp:142:31) &, const enum entt::entity &) at line /usr/bin/../lib64/gcc/x86_64-suse-linux/15/../../../../include/c++/15/bits/invoke.h:98:14
#5 Calling std::__invoke(class (lambda at /home/uni/projects/craftsdwarfship/systems/heroes-ai/party_in_quest_location2.cpp:142:31) &, const enum entt::entity &) at line /usr/bin/../lib64/gcc/x86_64-suse-linux/15/../../../../include/c++/15/bits/ranges_algo.h:190:4
#6 Calling std::ranges::__for_each_fn::operator()(class __gnu_cxx::__normal_iterator<const enum entt::entity *, class std::vector<enum entt::entity> >, class __gnu_cxx::__normal_iterator<const enum entt::entity *, class std::vector<enum entt::entity> >, class (lambda at /home/uni/projects/craftsdwarfship/systems/heroes-ai/party_in_quest_location2.cpp:142:31), struct std::identity) at line /usr/bin/../lib64/gcc/x86_64-suse-linux/15/../../../../include/c++/15/bits/ranges_algo.h:200:9
#7 Calling std::ranges::__for_each_fn::operator()(const class std::vector<enum entt::entity> &, class (lambda at /home/uni/projects/craftsdwarfship/systems/heroes-ai/party_in_quest_location2.cpp:142:31), struct std::identity) at line 146
#8 Calling CDS::(anonymous namespace)::rewardFight(entt::registry &, const GameState &, SystemContext &, std::span<const entt::entity>, const CombatSimulationState &)
3. /home/uni/projects/craftsdwarfship/build/Desktop_clang-Debug/vcpkg_installed/x64-linux/include/boost/pfr/detail/for_each_field_impl.hpp:47:18: Error evaluating statement
4. /home/uni/projects/craftsdwarfship/build/Desktop_clang-Debug/vcpkg_installed/x64-linux/include/boost/pfr/detail/for_each_field_impl.hpp:47:18: Error evaluating statement
#0 0x00007fdf482fef39 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lib64/libLLVM.so.21.1+0x6fef39)
#1 0x00007fdf482fbe13 llvm::sys::RunSignalHandlers() (/lib64/libLLVM.so.21.1+0x6fbe13)
#2 0x00007fdf482ff718 (/lib64/libLLVM.so.21.1+0x6ff718)
#3 0x00007fdf47442910 __restore_rt (/lib64/libc.so.6+0x42910)
#4 0x00007fdf527d758e clang::ento::ExprEngine::VisitCommonDeclRefExpr(clang::Expr const*, clang::NamedDecl const*, clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) (/lib64/libclang-cpp.so.21.1+0x29d758e)
#5 0x00007fdf527d0d2a clang::ento::ExprEngine::Visit(clang::Stmt const*, clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) (/lib64/libclang-cpp.so.21.1+0x29d0d2a)
#6 0x00007fdf527cdb69 clang::ento::ExprEngine::ProcessStmt(clang::Stmt const*, clang::ento::ExplodedNode*) (/lib64/libclang-cpp.so.21.1+0x29cdb69)
#7 0x00007fdf527af086 clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*, clang::ProgramPoint, clang::ento::WorkListUnit const&) (/lib64/libclang-cpp.so.21.1+0x29af086)
#8 0x00007fdf527ae93e clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*, unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) (/lib64/libclang-cpp.so.21.1+0x29ae93e)
#9 0x00007fdf52af6fc0 (/lib64/libclang-cpp.so.21.1+0x2cf6fc0)
#10 0x00007fdf52af5331 (/lib64/libclang-cpp.so.21.1+0x2cf5331)
#11 0x00007fdf524bbfec clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/lib64/libclang-cpp.so.21.1+0x26bbfec)
#12 0x00007fdf504c5fd9 clang::ParseAST(clang::Sema&, bool, bool) (/lib64/libclang-cpp.so.21.1+0x6c5fd9)
#13 0x00007fdf524785fd clang::FrontendAction::Execute() (/lib64/libclang-cpp.so.21.1+0x26785fd)
#14 0x00007fdf523bd22e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib64/libclang-cpp.so.21.1+0x25bd22e)
#15 0x00007fdf526bc0fe clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) (/lib64/libclang-cpp.so.21.1+0x28bc0fe)
#16 0x0000560aff04635c (/usr/bin/clang-tidy+0x74935c)
#17 0x00007fdf526bbd9d clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) (/lib64/libclang-cpp.so.21.1+0x28bbd9d)
#18 0x00007fdf526ba9dc clang::tooling::ToolInvocation::run() (/lib64/libclang-cpp.so.21.1+0x28ba9dc)
#19 0x00007fdf526bdf32 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) (/lib64/libclang-cpp.so.21.1+0x28bdf32)
#20 0x0000560aff041c36 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) (/usr/bin/clang-tidy+0x744c36)
#21 0x0000560afe9cb3de clang::tidy::clangTidyMain(int, char const**) (/usr/bin/clang-tidy+0xce3de)
#22 0x00007fdf4742b2fb __libc_start_call_main (/lib64/libc.so.6+0x2b2fb)
#23 0x00007fdf4742b3cb __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2b3cb)
#24 0x0000560afe9c7dc5 _start (/usr/bin/clang-tidy+0xcadc5)
/home/uni/projects/craftsdwarfship/systems/heroes-ai/party_in_quest_location2.cpp: terminated by signal 11
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs