Issue |
104883
|
Summary |
[clang-check] built from main as of today crashes checking one C++ file
|
Labels |
new issue
|
Assignees |
|
Reporter |
lopippo
|
Greetings,
the clang-check built from main in GitHub cloned yesterday, fails the check of the same file that was mentioned in #104800.
The command, from the build/bin directory was
Ě€devel/clang/llvm-project/build/bin>
% ./clang-check --analyze -p /home/rusconi/devel/xpertmass/build-area/unix/compile_commands.json /home/rusconi/devel/xpertmass/development/src/XpertMass/PolChemDef.cpp `
This is the output
<details>
```
clang version 20.0.0git (https://github.com/llvm/llvm-project.git 0ee0857363aadf9ce0f403e7e0da10f0a9d94887)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/rusconi/devel/clang/llvm-project/build/bin
Build config: +unoptimized, +assertions
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/13
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/14
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/14
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
"/home/rusconi/devel/clang/llvm-project/build/bin/clang-20" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -dumpdir a- -disable-free -clear-ast-before-backend -main-file-name PolChemDef.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debug-info-kind=constructor -dwarf-version=5 -debugger-tuning=gdb -fdebug-compilation-dir=/home/rusconi/devel/xpertmass/build-area/unix -v -fcoverage-compilation-dir=/home/rusconi/devel/xpertmass/build-area/unix -nostdsysteminc -nobuiltininc -resource-dir /home/rusconi/devel/clang/llvm-project/build/lib/clang/20 -working-directory /home/rusconi/devel/xpertmass/build-area/unix -isystem /usr/include/pappsomspp -isystem /usr/include/IsoSpec++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtXml -isystem /usr/include/x86_64-linux-gnu/qt6/QtNetwork -isystem /usr/include/c++/14 -isystem /usr/include/x86_64-linux-gnu/c++/14 -isystem /usr/include/c++/14/backward -isystem /usr/local/include -isystem /usr/include/x86_64-linux-gnu -isystem /usr/include -isystem /usr/lib/llvm-16/lib/clang/16/include -imacros /tmp/kdevelop.ymvMQA -I /home/rusconi/devel/xpertmass/build-area/unix/src/XpertMass/Core_static_autogen/include -I /home/rusconi/devel/xpertmass/development/src/XpertMass/includes/libXpertMass -Wunused-parameter -Wunreachable-code -Wall -Wno-unknown-pragmas -Wall -Wextra -Wno-gnu-zero-variadic-macro-arguments -pedantic -std=gnu++17 -fdeprecated-macro -ferror-limit 100 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fsized-deallocation -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/PolChemDef-965ee7.o -x c++ /home/rusconi/devel/xpertmass/development/src/XpertMass/PolChemDef.cpp
clang -cc1 version 20.0.0git based upon LLVM 20.0.0git default target x86_64-unknown-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
/home/rusconi/devel/xpertmass/build-area/unix/src/XpertMass/Core_static_autogen/include
/home/rusconi/devel/xpertmass/development/src/XpertMass/includes/libXpertMass
/usr/include/pappsomspp
/usr/include/IsoSpec++
/usr/include/x86_64-linux-gnu/qt6/QtCore
/usr/include/x86_64-linux-gnu/qt6
/usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++
/usr/include/x86_64-linux-gnu/qt6/QtXml
/usr/include/x86_64-linux-gnu/qt6/QtNetwork
/usr/include/c++/14
/usr/include/x86_64-linux-gnu/c++/14
/usr/include/c++/14/backward
/usr/local/include
/usr/include/x86_64-linux-gnu
/usr/include
/usr/lib/llvm-16/lib/clang/16/include
End of search list.
clang-20: /home/rusconi/devel/clang/llvm-project/llvm/include/llvm/Support/Casting.h:578: decltype(auto) llvm::cast(From*) [with To = clang::CXXMethodDecl; From = clang::NamedDecl]: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
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: /home/rusconi/devel/clang/llvm-project/build/bin/clang-20 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -dumpdir a- -disable-free -clear-ast-before-backend -main-file-name PolChemDef.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debug-info-kind=constructor -dwarf-version=5 -debugger-tuning=gdb -fdebug-compilation-dir=/home/rusconi/devel/xpertmass/build-area/unix -v -fcoverage-compilation-dir=/home/rusconi/devel/xpertmass/build-area/unix -nostdsysteminc -nobuiltininc -resource-dir /home/rusconi/devel/clang/llvm-project/build/lib/clang/20 -working-directory /home/rusconi/devel/xpertmass/build-area/unix -isystem /usr/include/pappsomspp -isystem /usr/include/IsoSpec++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtXml -isystem /usr/include/x86_64-linux-gnu/qt6/QtNetwork -isystem /usr/include/c++/14 -isystem /usr/include/x86_64-linux-gnu/c++/14 -isystem /usr/include/c++/14/backward -isystem /usr/local/include -isystem /usr/include/x86_64-linux-gnu -isystem /usr/include -isystem /usr/lib/llvm-16/lib/clang/16/include -imacros /tmp/kdevelop.ymvMQA -I /home/rusconi/devel/xpertmass/build-area/unix/src/XpertMass/Core_static_autogen/include -I /home/rusconi/devel/xpertmass/development/src/XpertMass/includes/libXpertMass -Wunused-parameter -Wunreachable-code -Wall -Wno-unknown-pragmas -Wall -Wextra -Wno-gnu-zero-variadic-macro-arguments -pedantic -std=gnu++17 -fdeprecated-macro -ferror-limit 100 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fsized-deallocation -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/PolChemDef-965ee7.o -x c++ /home/rusconi/devel/xpertmass/development/src/XpertMass/PolChemDef.cpp
1. <eof> parser at end of file
2. /usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h:1350:5: instantiating function definition 'qRegisterNormalizedMetaType<MsXpS::libXpertMass::Polymer>'
3. /usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h:1311:5: instantiating function definition 'qRegisterNormalizedMetaTypeImplementation<MsXpS::libXpertMass::Polymer>'
4. /usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h:2475:33: instantiating variable definition 'QtPrivate::QMetaTypeInterfaceWrapper<MsXpS::libXpertMass::Polymer>::metaType'
5. /usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h:2475:33: instantiating variable definition 'QtPrivate::QMetaTypeInterfaceWrapper<MsXpS::libXpertMass::Polymer>::metaType'
6. /usr/include/x86_64-linux-gnu/qt6/QtCore/qtypeinfo.h:303:23: instantiating variable definition 'QTypeTraits::has_operator_equal_v<MsXpS::libXpertMass::Polymer>'
7. /usr/include/x86_64-linux-gnu/qt6/QtCore/qtypeinfo.h:301:8: instantiating class definition 'QTypeTraits::has_operator_equal<MsXpS::libXpertMass::Polymer>'
8. /usr/include/x86_64-linux-gnu/qt6/QtCore/qtypeinfo.h:213:8: instantiating class definition 'QTypeTraits::detail::expand_operator_equal_container<MsXpS::libXpertMass::Polymer>'
9. /usr/include/x86_64-linux-gnu/qt6/QtCore/qtypeinfo.h:215:8: instantiating class definition 'QTypeTraits::detail::expand_operator_equal_tuple<MsXpS::libXpertMass::Polymer>'
#0 0x00005563931eb9f0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/rusconi/devel/clang/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:22
#1 0x00005563931ebe2e PrintStackTraceSignalHandler(void*) /home/rusconi/devel/clang/llvm-project/llvm/lib/Support/Unix/Signals.inc:798:1
#2 0x00005563931e9630 llvm::sys::RunSignalHandlers() /home/rusconi/devel/clang/llvm-project/llvm/lib/Support/Signals.cpp:105:20
#3 0x00005563931eb3c2 SignalHandler(int) /home/rusconi/devel/clang/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
#4 0x00007fd6d6174590 (/lib/x86_64-linux-gnu/libc.so.6+0x3f590)
#5 0x00007fd6d61c33ac __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#6 0x00007fd6d61744f2 raise ./signal/../sysdeps/posix/raise.c:27:6
#7 0x00007fd6d615d4ed abort ./stdlib/abort.c:81:7
#8 0x00007fd6d615d415 _nl_load_domain ./intl/loadmsgcat.c:1177:9
#9 0x00007fd6d616d012 (/lib/x86_64-linux-gnu/libc.so.6+0x38012)
#10 0x00005563983cd065 decltype(auto) llvm::cast<clang::CXXMethodDecl, clang::NamedDecl>(clang::NamedDecl*) /home/rusconi/devel/clang/llvm-project/llvm/include/llvm/Support/Casting.h:579:38
#11 0x00005563987eddfc clang::Sema::AddMethodCandidate(clang::DeclAccessPair, clang::QualType, clang::Expr::Classification, llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, clang::OverloadCandidateParamOrder) /home/rusconi/devel/clang/llvm-project/clang/lib/Sema/SemaOverload.cpp:7429:23
#12 0x00005563987f1866 clang::Sema::AddMemberOperatorCandidates(clang::OverloadedOperatorKind, clang::SourceLocation, llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, clang::OverloadCandidateParamOrder) /home/rusconi/devel/clang/llvm-project/clang/lib/Sema/SemaOverload.cpp:8347:25
#13 0x0000556398809db2 clang::Sema::LookupOverloadedBinOp(clang::OverloadCandidateSet&, clang::OverloadedOperatorKind, clang::UnresolvedSetImpl const&, llvm::ArrayRef<clang::Expr*>, bool) /home/rusconi/devel/clang/llvm-project/clang/lib/Sema/SemaOverload.cpp:14438:30
#14 0x000055639880a804 clang::Sema::CreateOverloadedBinOp(clang::SourceLocation, clang::BinaryOperatorKind, clang::UnresolvedSetImpl const&, clang::Expr*, clang::Expr*, bool, bool, clang::FunctionDecl*) /home/rusconi/devel/clang/llvm-project/clang/lib/Sema/SemaOverload.cpp:14571:24
#15 0x0000556397fe3b13 BuildOverloadedBinOp(clang::Sema&, clang::Scope*, clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) /home/rusconi/devel/clang/llvm-project/clang/lib/Sema/SemaExpr.cpp:15125:33
#16 0x0000556397fe43aa clang::Sema::BuildBinOp(clang::Scope*, clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) /home/rusconi/devel/clang/llvm-project/clang/lib/Sema/SemaExpr.cpp:15223:73
#17 0x0000556398c665f7 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::RebuildBinaryOperator(clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) /home/rusconi/devel/clang/llvm-project/clang/lib/Sema/TreeTransform.h:2966:3
#18 0x0000556398c47f1e clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformBinaryOperator(clang::BinaryOperator*) /home/rusconi/devel/clang/llvm-project/clang/lib/Sema/TreeTransform.h:12589:44
#19 0x0000556398c31a45 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) /home/rusconi/devel/clang/llvm-project/build/tools/clang/include/clang/AST/StmtNodes.inc:780:1
#20 0x0000556398c36976 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformInitializer(clang::Expr*, bool) /home/rusconi/devel/clang/llvm-project/clang/lib/Sema/TreeTransform.h:4228:38
```
</details>
I could not find a way to create preprocessed source files, but the ones from #104800 might help ?
I'd be eager to provide any information aimed at solving this issue (maybe the full backtrace or the output from strace).
Most sincerely,
Filippo Rusconi
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs