Skip to content

clang-tidy crash altera::StructPackAlignCheck::check() #53995

Closed as not planned
Closed as not planned
@barries

Description

@barries

This is the first run during an upgrade from clang-tidy-8 to 13.0.0, and I see a command line arg being dumped wrong, so (long shot) that might be related.

The actual command line is:

/opt/clang+llvm/13.0.0/bin/clang-tidy Bag_Mgr_Executable/BagManager.cpp -warnings-as-errors=* -- -nobuiltininc -std=gnu++1z -DDEBUG=1 -DBOOST_USE_UCONTEXT=1 -DBUILDHOST_PLATFORM=1 -DPLATFORM=buildhost -DGRAVIMETRIC_CHECKS_ENABLED=1 -DIS_RIGHT_DOOR_AVAILABLE=0 -DIS_SYRINGE_VISION_AVAILABLE=1 -DIS_VIAL_VISION_AVAILABLE=1 -DIVTEST_FULL_VISION=0 -DIS_QT_AVAILABLE=1 -DIS_MODBUS_AVAILABLE=1 -DIS_OPENCV_AVAILABLE=1 -DIS_SWIFT_AVAILABLE=1 -DCHECK_MILKING_ASSERTIONS=1 -DPLATFORM=buildhost -DIVTEST_IMAGE_BASE_DIR= -DIVSIMULATOR_IMAGE_BASE_DIR= -DUSE_GIGE -fPIC -D__CLANG_TIDY__ -isystem /opt/Qt/6.2.2/gcc_64_stat/include -isystem /opt/Qt/6.2.2/
gcc_64_stat/include/QtCore -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtCore/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtCore/6.2.2/QtCore -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtEventDispatcherSupport/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtFontDatabaseSupport/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64
_stat/include/QtGui -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtGui/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtGui/6.2.2/QtGui -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtMultimedia -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtNetwork -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQml -isystem /opt/Qt/6.2.2/gcc
_64_stat/include/QtQml/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQml/6.2.2/QtQml -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuick -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuick/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuick/6.2.2/QtQuick -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuickTemplat
es2/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuickTemplates2/6.2.2/QtQuickTemplates2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtWidgets -isystem /opt/Qt/6.2.2/gcc_64_stat/mkspecs/linux-g++ -isystem /usr/include/libdrm -isystem /opt/Qt/6.2.2/gcc_64_stat/include -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtCo
re -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtCore/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtCore/6.2.2/QtCore -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtEventDispatcherSupport/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtFontDatabaseSupport/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtGui -isy
stem /opt/Qt/6.2.2/gcc_64_stat/include/QtGui/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtGui/6.2.2/QtGui -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtMultimedia -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtNetwork -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQml -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQml/6
.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQml/6.2.2/QtQml -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuick -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuick/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuick/6.2.2/QtQuick -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuickTemplates2/6.2.2 -isystem /opt/
Qt/6.2.2/gcc_64_stat/include/QtQuickTemplates2/6.2.2/QtQuickTemplates2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtWidgets -isystem /opt/Qt/6.2.2/gcc_64_stat/mkspecs/linux-g++ -isystem /usr/include/libdrm -isystem /opt/boost/boost_1_72_0/x86/include -isystem /usr/local/include -isystem /opt/pylon5/include -isystem /op
t/modbus/3.1.6/include/modbus -isystem /opt/opencv/opencv_420/x86/include/opencv4 -isystem /opt/opencv/opencv_420/x86/include/opencv4/opencv -IStationLib -IFramework/cg -IFramework -ICommonComponents -IBag_Mgr_Executable/cg -IDoor_Executable -IDoser_Executable -ILeft_Executable -IRight_Front_Executable -IRight_Rear_Exe
cutable -IStation_Executable -IStation_Executable/cg -IBag_Mgr_Executable/cg -IBag_Mgr_Executable
Stack dump:
0.      Program arguments: /opt/clang+llvm/13.0.0/bin/clang-tidy Bag_Mgr_Executable/BagManager.cpp =* -- -nobuiltininc -std=gnu++1z -DDEBUG=1 -DBOOST_USE_UCONTEXT=1 -DBUILDHOST_PLATFORM=1 -DPLATFORM=buildhost -DGRAVIMETRIC_CHECKS_ENABLED=1 -DIS_RIGHT_DOOR_AVAILABLE=0 -DIS_SYRINGE_VISION_AVAILABLE=1 -DIS_VIAL_VISION_AVA
ILABLE=1 -DIVTEST_FULL_VISION=0 -DIS_QT_AVAILABLE=1 -DIS_MODBUS_AVAILABLE=1 -DIS_OPENCV_AVAILABLE=1 -DIS_SWIFT_AVAILABLE=1 -DCHECK_MILKING_ASSERTIONS=1 -DPLATFORM=buildhost -DIVTEST_IMAGE_BASE_DIR= -DIVSIMULATOR_IMAGE_BASE_DIR= -DUSE_GIGE -fPIC -D__CLANG_TIDY__ -isystem /opt/Qt/6.2.2/gcc_64_stat/include -isystem /opt/Q
t/6.2.2/gcc_64_stat/include/QtCore -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtCore/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtCore/6.2.2/QtCore -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtEventDispatcherSupport/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtFontDatabaseSupport/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtGui -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtGui/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtGui/6.2.2/QtGui -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtMultimedia -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtNetwork -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQml -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQml/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQml/6.2.2/QtQml -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuick -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuick/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuick/6.2.2/QtQuick -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuickTemplates2/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuickTemplates2/6.2.2/QtQuickTemplates2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtWidgets -isystem /opt/Qt/6.2.2/gcc_64_stat/mkspecs/linux-g++ -isystem /usr/include/libdrm -isystem /opt/Qt/6.2.2/gcc_64_stat/include -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtCore -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtCore/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtCore/6.2.2/QtCore -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtEventDispatcherSupport/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtFontDatabaseSupport/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtGui -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtGui/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtGui/6.2.2/QtGui -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtMultimedia -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtNetwork -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQml -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQml/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQml/6.2.2/QtQml -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuick -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuick/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuick/6.2.2/QtQuick -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuickTemplates2/6.2.2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtQuickTemplates2/6.2.2/QtQuickTemplates2 -isystem /opt/Qt/6.2.2/gcc_64_stat/include/QtWidgets -isystem /opt/Qt/6.2.2/gcc_64_stat/mkspecs/linux-g++ -isystem /usr/include/libdrm -isystem /opt/boost/boost_1_72_0/x86/include -isystem /usr/local/include -isystem /opt/pylon5/include -isystem /opt/modbus/3.1.6/include/modbus -isystem /opt/opencv/opencv_420/x86/include/opencv4 -isystem /opt/opencv/opencv_420/x86/include/opencv4/opencv -IStationLib -IFramework/cg -IFramework -ICommonComponents -IBag_Mgr_Executable/cg -IDoor_Executable -IDoser_Executable -ILeft_Executable -IRight_Front_Executable -IRight_Rear_Executable -IStation_Executable -IStation_Executable/cg -IBag_Mgr_Executable/cg -IBag_Mgr_Executable                                                                                                                                                                                                                       1.      <eof> parser at end of file                                                                                                                                                                                                                                                                                              #0 0x0000000001460803 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x1460803)
 #1 0x000000000145e93e llvm::sys::RunSignalHandlers() (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x145e93e)
 #2 0x0000000001460e2f SignalHandler(int) Signals.cpp:0:0
 #3 0x00007fb51848e520 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x13520)
 #4 0x00000000016a832c clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x16a832c)
 #5 0x00000000016a8878 clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x16a8878)
 #6 0x00000000016a8878 clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x16a8878)
 #7 0x0000000001b98a90 clang::tidy::altera::StructPackAlignCheck::check(clang::ast_matchers::MatchFinder::MatchResult const&) (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x1b98a90)
 #8 0x00000000018e4592 clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::MatchVisitor::visitMatch(clang::ast_matchers::BoundNodes const&) ASTMatchFinder.cpp:0:0
 #9 0x000000000190df3c clang::ast_matchers::internal::BoundNodesTreeBuilder::visitMatches(clang::ast_matchers::internal::BoundNodesTreeBuilder::Visitor*) (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x190df3c)
#10 0x00000000018e3cc1 clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::matchWithFilter(clang::DynTypedNode const&) ASTMatchFinder.cpp:0:0
#11 0x00000000018e6017 clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl(clang::Decl*) ASTMatchFinder.cpp:0:0
#12 0x00000000018edb9b clang::RecursiveASTVisitor<clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) ASTMatchFinder.cpp:0:0
#13 0x00000000018e67ca clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl(clang::Decl*) ASTMatchFinder.cpp:0:0
#14 0x00000000018bb8c1 clang::ast_matchers::MatchFinder::matchAST(clang::ASTContext&) (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x18bb8c1)
#15 0x000000000262024c clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x262024c)
#16 0x00000000027c2064 clang::ParseAST(clang::Sema&, bool, bool) (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x27c2064)
#17 0x0000000002607249 clang::FrontendAction::Execute() (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x2607249)
#18 0x0000000002573746 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x2573746)
#19 0x00000000014b39cd clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x14b39cd)
#20 0x00000000014e9566 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)::ActionFacto
ry::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) ClangTidy.cpp:0:0
#21 0x00000000014b372a clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x14b372a)                                                                    #22 0x00000000014b2933 clang::tooling::ToolInvocation::run() (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x14b2933)
#23 0x00000000014b4ee5 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x14b4ee5)
#24 0x00000000014e4b07 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) (/opt/clang+
llvm/13.0.0/bin/clang-tidy+0x14e4b07)
#25 0x0000000001429566 clang::tidy::clangTidyMain(int, char const**) (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x1429566)                                                                                                                                                                                                          #26 0x00007fb517f57bbb __libc_start_main /build/glibc-TrjWJf/glibc-2.29/csu/../csu/libc-start.c:342:3
#27 0x0000000001425b3e _start (/opt/clang+llvm/13.0.0/bin/clang-tidy+0x1425b3e)

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-tidycrashPrefer [crash-on-valid] or [crash-on-invalid]incompleteIssue not complete (e.g. missing a reproducer, build arguments, etc.)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions