Admin message

Join us at Akademy to celebrate KDE's 30th anniversary! Travel support requests are open till May 31st. Register now.

clazy crashes due to "std::bitset<int(8)>" signal parameter
As the title says - I'm running in the problem that the clazy compile job does not finish. The Project is built with `-Xclang -load -Xclang ClazyPlugin.so -Xclang -add-plugin -Xclang clazy`. It compiles some time, but then hits some files where the fan turns on and the compile process stalls. The complile process start draining the CPU with 100% and the last thing I can see if I start one of the compile jobs with strace is ``` ... write(4, "\30\0\0\0\0\0\0\0\230M\0\0\1\0\0\0\2\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\274\261\0\0\0\0\0\0004\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\203\26\0\0\21\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\260\n\1\0\0\0\0\0\20\0\0\0\0\0\0\0\230\1\0\0@\2\0\0\4\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0\256E\0\0\1\0\0\0\6\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\360\261\0\0\0\0\0\0\5\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251E\0\0\4\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\220\274\1\0\0\0\0\0H\0\0\0\0\0\0\0\230\1\0\0\26\1\0\0\10\0\0\0\0\0\0\0\30\0\0\0\0\0\0\0\1F\0\0\1\0\0\0\2\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\370\263\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\203\26\0\0\21\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\300\n\1\0\0\0\0\0\20\0\0\0\0\0\0\0\230\1\0\0?\2\0\0\4\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0\201A\0\0\1\0\0\0\6\2\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0\0\0\0\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t.\0\0\4\0\0\0@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\30\324\1\0\0\0\0\0000\0\0\0\0\0\0\0\230\1\0\0b\1\0\0\10\0\0\0\0\0\0\0"..., 4096) = 4096 write(4, "\1\0\0\0\0\0\0\0\\\35\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0}\346\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\"\0\0\1\0\0p\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\346\0\0\0\0\0\0\210!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\v\"\0\0\4\0\0\0@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\210\326\1\0\0\0\0\0(\21\0\0\0\0\0\0\230\1\0\0\225\1\0\0\10\0\0\0\0\0\0\0\30\0\0\0\0\0\0\0\26!\0\0\3L\377o\0\0\0\200\0\0\0\0\0\0\0\0\0\0\0\0\260\347\1\0\0\0\0\0\223\0\0\0\0\0\0\0\230\1\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6$\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\v\1\0\0\0\0\0\2007\0\0\0\0\0\0\1\0\0\0`\1\0\0\10\0\0\0\0\0\0\0\30\0\0\0\0\0\0\0", 328) = 328 lseek(4, 40, SEEK_SET) = 40 write(4, "\10[\2\0\0\0\0\0", 8) = 8 lseek(4, 180552, SEEK_SET) = 180552 lseek(4, 60, SEEK_SET) = 60 write(4, "\231\1", 2) = 2 lseek(4, 180552, SEEK_SET) = 180552 ``` , ltrace shows up with ``` [pid 644682] strlen(0x7ffff754dc0c, 0x2d646e756f72522d, 0x7fe9aeb97847, 0x2d706972742d646e) = 72 [pid 644682] strlen(0x7fe9aea834de, 0x2d646e756f72522d, 0x7ffff754dc0c, 0x2d706972742d646e) = 2 [pid 644682] strlen(0x7fe9aebae2e5, 0x2d646e756f72522d, 0x7fe9aea834de, 0x2d706972742d646e) = 3 [pid 644682] strlen(0x7ffff754dc58, 0x2d646e756f72522d, 0x7fe9aebae2e5, 0x2d706972742d646e) = 80 [pid 644682] _ZN5clang18CompilerInvocation14CreateFromArgsERS0_N4llvm8ArrayRefIPKcEERNS_17DiagnosticsEngineES5_(0x5594479dd4b0, 0x5594479d9a08, 233, 0x7ffff7541e00) = 1 [pid 644682] _ZN4llvm3vfs17getRealFileSystemEv(0x7ffff75459b0, 1, 0x5594479dc, 0x13418001) = 0x7ffff75459b0 [pid 644682] _ZN5clang16CompilerInstance17createDiagnosticsERN4llvm3vfs10FileSystemEPNS_18DiagnosticConsumerEb(0x5594479d51d0, 0x5594479c8b60, 0, 1) = 0xbaf29ee5a5795200 [pid 644682] _ZN4llvm27install_fatal_error_handlerEPFvPvPKcbES0_(0x55943ee9ffc0, 0x5594479f0380, 1, 0) = 0 [pid 644682] _ZNK5clang20TextDiagnosticBuffer16FlushDiagnosticsERNS_17DiagnosticsEngineE(0x559447998f70, 0x5594479f0380, 0, 0) = 0xbaf29ee5a5795200 [pid 644682] _ZN4llvm22timeTraceProfilerBeginENS_9StringRefES0_(0x55943eeb4f18, 15, 0, 0) = 0 [pid 644682] _ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE(0x5594479d51d0, 15, 0x7fe9a2501160, 0xbaf29ee5a5795200 ``` . I've tracked that down to a ``` signals: void valueChanged(std::bitset<int(8)>); ``` somewhere in a header file, although the cooked down example (attached) does not run forever, but crashes: ``` $ clang++-20 -isystem /usr/include/qt6 -isystem /usr/include/qt6/QtCore -c test.cpp -Xclang -load -Xclang ClazyPlugin.so -Xclang -add-plugin -Xclang clazy PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: clang++-20 -isystem /usr/include/qt6 -isystem /usr/include/qt6/QtCore -c test.cpp -Xclang -load -Xclang ClazyPlugin.so -Xclang -add-plugin -Xclang clazy 1. <eof> parser at end of file #0 0x00007f6d305db14a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lib64/libLLVM.so.20.1+0x22914a) #1 0x00007f6d305d80d4 llvm::sys::RunSignalHandlers() (/lib64/libLLVM.so.20.1+0x2260d4) #2 0x00007f6d304f18e4 (/lib64/libLLVM.so.20.1+0x13f8e4) #3 0x00007f6d2ff36c30 __restore_rt (/lib64/libc.so.6+0x19c30) #4 0x00007f6d2f8f9024 getQualifiedNameOfType(clang::Type const*, clang::LangOptions const&, bool) fully-qualified-moc-types.cpp:0:0 #5 0x00007f6d2f8f9313 resolveTemplateType(clang::TemplateSpecializationType const*, clang::LangOptions, bool) fully-qualified-moc-types.cpp:0:0 #6 0x00007f6d2f8f97e8 FullyQualifiedMocTypes::typeIsFullyQualified(clang::QualType, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const (/lib64/ClazyPlugin.so+0xa47e8) #7 0x00007f6d2f8fa0ca FullyQualifiedMocTypes::VisitDecl(clang::Decl*) (/lib64/ClazyPlugin.so+0xa50ca) #8 0x00007f6d2f987990 ClazyASTConsumer::VisitDecl(clang::Decl*) (/lib64/ClazyPlugin.so+0x132990) #9 0x00007f6d2f9903d7 clang::RecursiveASTVisitor<ClazyASTConsumer>::TraverseDecl(clang::Decl*) (/lib64/ClazyPlugin.so+0x13b3d7) #10 0x00007f6d2f9a4e4b clang::RecursiveASTVisitor<ClazyASTConsumer>::TraverseCXXRecordDecl(clang::CXXRecordDecl*) (/lib64/ClazyPlugin.so+0x14fe4b) #11 0x00007f6d2f990c1a clang::RecursiveASTVisitor<ClazyASTConsumer>::TraverseDeclContextHelper(clang::DeclContext*) (/lib64/ClazyPlugin.so+0x13bc1a) #12 0x00007f6d2f9a3192 clang::RecursiveASTVisitor<ClazyASTConsumer>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) (/lib64/ClazyPlugin.so+0x14e192) #13 0x00007f6d2f98e99b ClazyASTConsumer::HandleTranslationUnit(clang::ASTContext&) (/lib64/ClazyPlugin.so+0x13999b) #14 0x00007f6d3b4e755c clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/lib64/libclang-cpp.so.20.1+0x295b55c) #15 0x00007f6d38d9ee89 clang::ParseAST(clang::Sema&, bool, bool) (/lib64/libclang-cpp.so.20.1+0x212e89) #16 0x00007f6d3b4a242f clang::FrontendAction::Execute() (/lib64/libclang-cpp.so.20.1+0x291642f) #17 0x00007f6d3b404cc4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib64/libclang-cpp.so.20.1+0x2878cc4) #18 0x00007f6d3b535f3e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib64/libclang-cpp.so.20.1+0x29a9f3e) #19 0x0000563e9bf3a695 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib64/llvm20/bin/clang-20+0xa695) #20 0x0000563e9bf36727 (/usr/lib64/llvm20/bin/clang-20+0x6727) #21 0x00007f6d3afa53dd (/lib64/libclang-cpp.so.20.1+0x24193dd) #22 0x00007f6d304f15f0 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/lib64/libLLVM.so.20.1+0x13f5f0) #23 0x00007f6d3afa4c95 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/lib64/libclang-cpp.so.20.1+0x2418c95) #24 0x00007f6d3af60eb9 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/lib64/libclang-cpp.so.20.1+0x23d4eb9) #25 0x00007f6d3af61177 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/lib64/libclang-cpp.so.20.1+0x23d5177) #26 0x00007f6d3af83d39 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/lib64/libclang-cpp.so.20.1+0x23f7d39) #27 0x0000563e9bf35b54 clang_main(int, char**, llvm::ToolContext const&) (/usr/lib64/llvm20/bin/clang-20+0x5b54) #28 0x0000563e9bf459a8 main (/usr/lib64/llvm20/bin/clang-20+0x159a8) #29 0x00007f6d2ff205f5 __libc_start_call_main (/lib64/libc.so.6+0x35f5) #30 0x00007f6d2ff206a8 __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x36a8) #31 0x0000563e9bf33e05 _start (/usr/lib64/llvm20/bin/clang-20+0x3e05) clang++-20: error: clang frontend command failed with exit code 139 (use -v to see invocation) clang version 20.1.3 (Fedora 20.1.3-1.fc42) Target: x86_64-redhat-linux-gnu Thread model: posix InstalledDir: /usr/lib64/llvm20/bin Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang++.cfg clang++-20: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang++-20: note: diagnostic msg: /tmp/test-50dabc.cpp clang++-20: note: diagnostic msg: /tmp/test-50dabc.sh clang++-20: note: diagnostic msg: ******************** ``` Leaving out the clazy plugin builds fine. The build environment builds clazy (master, clang 20.1.3) as shown in this docker file excerpt: ``` FROM fedora:42 as clazy RUN dnf upgrade -y --refresh && \ dnf install -y git ninja-build cmake gcc gcc-c++ llvm-devel llvm clang clang-devel bash && \ rm $(rpm -ql llvm-static | grep lib64) && \ git clone --branch master https://github.com/KDE/clazy.git && \ cd clazy && \ git checkout d60a59a716f4e5a520ca3eda68a9f187e3d1b02c && \ mkdir build && \ cd build && \ cmake -DCMAKE_INSTALL_PREFIX=/opt -DCMAKE_BUILD_TYPE=Release -G Ninja .. && \ cmake --build . && \ cmake --build . --target install ``` [test.cpp](/uploads/fa49fa50a2e1b34c0d7b0db6162f4760/test.cpp) [test.h](/uploads/3df58552a42c536ba7df3ea75bc74c4e/test.h) [clang-diag.tgz](/uploads/10cfbc122bedc8f22de577906ae6ecf5/clang-diag.tgz) Do you have any idea what's wrong here?
issue