Clang frontend told me to submit a bug report
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
```console
[51/1849] Building CXX object xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.cxx.obj
FAILED: [code=1] xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.cxx.obj
/usr/bin/clang-cl --target=x86_64-w64-windows-msvc /nologo -TP -DNDEBUG -DWIN32 -DXRCPU_PIPE_EXPORTS -D_MBCS -D_SECURE_SCL=0 -D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -D_USRDLL -D_VC80_UPGRADE=0x0710 -D_WINDOWS -I/home/makar/xray-monolith/src/../src/3rd_party -I/home/makar/xray-monolith/src/3rd_party/icu/include -I/home/makar/xray-monolith/src/../sdk/include -I/home/makar/xray-monolith/src/../sdk/include/OpenAutomate -I/home/makar/xray-monolith/src/../sdk/include/nvapi -I/home/makar/xray-monolith/src/../sdk/include/dxsdk -I/home/makar/xray-monolith/src/xrCPU_Pipe/../../sdk/include -I/home/makar/xray-monolith/src/xrCore/. -I/home/makar/xray-monolith/src/xrCore/../3rd_party/optick-git/src -I/home/makar/xray-monolith/src/xrCore/../../sdk/include -I/mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/simde-src -imsvc/mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/spdlog-src/include -imsvc/mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/fmt-src/include -imsvc/mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/stdfunc-src/include -imsvc/mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/xxhash-src/cmake_unofficial/.. -imsvc/mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/snappy-build -imsvc/mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/snappy-src -imsvc/mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/zstd-src/build/cmake/../../lib -imsvc/mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/glaze-src/include -clang:-std=c++23 -MD -clang:-Wno-c++11-narrowing -clang:-Wno-microsoft-cast -clang:-Wno-microsoft-enum-value -clang:-Wno-invalid-offsetof -clang:-fms-extensions -clang:-fms-compatibility -clang:-fdelayed-template-parsing -clang:-march=native /O2 /Oi /GF /GT /Oy /Gy /Zi /Ob3 /std:c++latest /wd4995 /Yc/home/makar/xray-monolith/src/build_msvc/xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.hxx /Fp/home/makar/xray-monolith/src/build_msvc/xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/.//cmake_pch.cxx.pch /FI/home/makar/xray-monolith/src/build_msvc/xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.hxx -clang:-MD -clang:-MTxrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.cxx.obj -clang:-MFxrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.cxx.obj.d /FoxrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.cxx.obj /FdxrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/xrCPU_Pipe.pdb -c -- /home/makar/xray-monolith/src/build_msvc/xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.cxx
clang-cl: warning: -fdelayed-template-parsing is deprecated after C++20 [-Wdelayed-template-parsing-in-cxx20]
clang-cl: warning: -fdelayed-template-parsing is deprecated after C++20 [-Wdelayed-template-parsing-in-cxx20]
clang-cl: warning: argument unused during compilation: '/GT' [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '/std:c++latest' [-Wunused-command-line-argument]
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: /usr/bin/clang-cl -cc1 -triple x86_64-w64-windows-msvc19.33.0 -O3 -emit-pch -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cmake_pch.cxx -mrelocation-model pic -pic-level 2 -mframe-pointer=none -relaxed-aliasing -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -fms-volatile -funwind-tables=2 -target-cpu znver1 -target-feature +prfchw -target-feature -cldemote -target-feature +avx -target-feature +aes -target-feature +sahf -target-feature +pclmul -target-feature -xop -target-feature +crc32 -target-feature -amx-fp8 -target-feature +xsaves -target-feature -avx512fp16 -target-feature -usermsr -target-feature -sm4 -target-feature -egpr -target-feature +sse4.1 -target-feature -avx10.1 -target-feature -avx512ifma -target-feature +xsave -target-feature +sse4.2 -target-feature -tsxldtrk -target-feature -sm3 -target-feature -ptwrite -target-feature -widekl -target-feature -movrs -target-feature -invpcid -target-feature +64bit -target-feature +xsavec -target-feature -avx512vpopcntdq -target-feature +cmov -target-feature -avx512vp2intersect -target-feature -avx512cd -target-feature +movbe -target-feature -avxvnniint8 -target-feature -ccmp -target-feature -amx-int8 -target-feature -kl -target-feature -sha512 -target-feature -avxvnni -target-feature -rtm -target-feature +adx -target-feature +avx2 -target-feature -hreset -target-feature -movdiri -target-feature -serialize -target-feature -vpclmulqdq -target-feature -avx512vl -target-feature -uintr -target-feature -cf -target-feature +clflushopt -target-feature -raoint -target-feature -cmpccxadd -target-feature +bmi -target-feature -amx-tile -target-feature +sse -target-feature -gfni -target-feature -avxvnniint16 -target-feature -amx-fp16 -target-feature -zu -target-feature -ndd -target-feature +xsaveopt -target-feature +rdrnd -target-feature -avx512f -target-feature -amx-bf16 -target-feature -avx512bf16 -target-feature -avx512vnni -target-feature -push2pop2 -target-feature +cx8 -target-feature -avx512bw -target-feature +sse3 -target-feature -pku -target-feature -nf -target-feature -amx-tf32 -target-feature -amx-avx512 -target-feature +fsgsbase -target-feature +clzero -target-feature +mwaitx -target-feature -lwp -target-feature +lzcnt -target-feature +sha -target-feature -movdir64b -target-feature -ppx -target-feature -wbnoinvd -target-feature -enqcmd -target-feature -avxneconvert -target-feature -tbm -target-feature -pconfig -target-feature -amx-complex -target-feature +ssse3 -target-feature +cx16 -target-feature -avx10.2 -target-feature +bmi2 -target-feature +fma -target-feature +popcnt -target-feature -avxifma -target-feature +f16c -target-feature -avx512bitalg -target-feature -rdpru -target-feature -clwb -target-feature +mmx -target-feature +sse2 -target-feature +rdseed -target-feature -avx512vbmi2 -target-feature -prefetchi -target-feature -amx-movrs -target-feature -rdpid -target-feature -fma4 -target-feature -avx512vbmi -target-feature -shstk -target-feature -vaes -target-feature -waitpkg -target-feature -sgx -target-feature +fxsr -target-feature -avx512dq -target-feature +sse4a -mllvm -x86-asm-syntax=intel -D_MT -D_DLL --dependent-lib=msvcrt --dependent-lib=oldnames -stack-protector 2 -fdiagnostics-format msvc -gno-column-info -gcodeview -debug-info-kind=constructor -fdebug-compilation-dir=/home/makar/xray-monolith/src/build_msvc -object-file-name=/home/makar/xray-monolith/src/build_msvc/xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.cxx.pch -ffunction-sections -fcoverage-compilation-dir=/home/makar/xray-monolith/src/build_msvc -resource-dir /usr/lib/clang/22 -dependency-file xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.cxx.obj.d -MT xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.cxx.obj -sys-header-deps -module-file-deps -building-pch-with-obj -fpch-instantiate-templates -pch-through-header=/home/makar/xray-monolith/src/build_msvc/xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.hxx -include /home/makar/xray-monolith/src/build_msvc/xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.hxx -D NDEBUG -D WIN32 -D XRCPU_PIPE_EXPORTS -D _MBCS -D _SECURE_SCL=0 -D _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -D _USRDLL -D _VC80_UPGRADE=0x0710 -D _WINDOWS -I /home/makar/xray-monolith/src/../src/3rd_party -I /home/makar/xray-monolith/src/3rd_party/icu/include -I /home/makar/xray-monolith/src/../sdk/include -I /home/makar/xray-monolith/src/../sdk/include/OpenAutomate -I /home/makar/xray-monolith/src/../sdk/include/nvapi -I /home/makar/xray-monolith/src/../sdk/include/dxsdk -I /home/makar/xray-monolith/src/xrCPU_Pipe/../../sdk/include -I /home/makar/xray-monolith/src/xrCore/. -I /home/makar/xray-monolith/src/xrCore/../3rd_party/optick-git/src -I /home/makar/xray-monolith/src/xrCore/../../sdk/include -I /mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/simde-src -internal-isystem /usr/lib/clang/22/include -internal-isystem /mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/spdlog-src/include -internal-isystem /mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/fmt-src/include -internal-isystem /mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/stdfunc-src/include -internal-isystem /mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/xxhash-src/cmake_unofficial/.. -internal-isystem /mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/snappy-build -internal-isystem /mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/snappy-src -internal-isystem /mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/zstd-src/build/cmake/../../lib -internal-isystem /mnt/hdd/Projects/xray-monolith/src/build_msvc/_deps/glaze-src/include -internal-isystem /mnt/hdd/msvc_wine/vc/tools/msvc/14.51.36231/atlmfc/include -internal-isystem /mnt/hdd/msvc_wine/vc/tools/msvc/14.51.36231/include -internal-isystem /mnt/hdd/msvc_wine/kits/10/include/10.0.26100.0/shared -internal-isystem /mnt/hdd/msvc_wine/kits/10/include/10.0.26100.0/ucrt -internal-isystem /mnt/hdd/msvc_wine/kits/10/include/10.0.26100.0/um -internal-isystem /mnt/hdd/msvc_wine/kits/10/include/10.0.26100.0/winrt -internal-isystem /mnt/hdd/msvc_wine/kits/10/include/10.0.26100.0/km -Wno-c++11-narrowing -Wno-microsoft-cast -Wno-microsoft-enum-value -Wno-invalid-offsetof -std=c++23 -fdeprecated-macro -ferror-limit 19 -fno-use-cxa-atexit -fms-extensions -fms-compatibility -fms-compatibility-version=19.33 -finline-functions -fno-implicit-modules -fskip-odr-check-in-gmf -fdelayed-template-parsing -vectorize-loops -vectorize-slp -faddrsig -o /home/makar/xray-monolith/src/build_msvc/xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/.//cmake_pch.cxx.pch -x c++-header /home/makar/xray-monolith/src/build_msvc/xrCPU_Pipe/CMakeFiles/xrCPU_Pipe.dir/cmake_pch.cxx
1. parser at end of file
2. /mnt/hdd/msvc_wine/vc/tools/msvc/14.51.36231/include/xmemory:624:30: serializing 'std::_Normal_allocator_traits>::destroy'
#0 0x00007fb5a819143a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/libLLVM.so.22.1+0x839143a)
#1 0x00007fb5a80f6b7c (/usr/lib/libLLVM.so.22.1+0x82f6b7c)
#2 0x00007fb59f6448f0 (/usr/lib/libc.so.6+0x448f0)
#3 0x00007fb5aa452f00 (/usr/lib/libclang-cpp.so.22.1+0x1652f00)
#4 0x00007fb5aa4527ac clang::LinkageComputer::getLVForClassMember(clang::NamedDecl const*, clang::LVComputationKind, bool) (/usr/lib/libclang-cpp.so.22.1+0x16527ac)
#5 0x00007fb5a9d83e28 clang::LinkageComputer::getLVForDecl(clang::NamedDecl const*, clang::LVComputationKind) (/usr/lib/libclang-cpp.so.22.1+0xf83e28)
#6 0x00007fb5aa5916ab clang::ASTDeclWriter::VisitFunctionDecl(clang::FunctionDecl*) (/usr/lib/libclang-cpp.so.22.1+0x17916ab)
#7 0x00007fb5ababdcb8 clang::ASTDeclWriter::VisitCXXMethodDecl(clang::CXXMethodDecl*) (/usr/lib/libclang-cpp.so.22.1+0x2cbdcb8)
#8 0x00007fb5aa2cec8a clang::ASTDeclWriter::Visit(clang::Decl*) (/usr/lib/libclang-cpp.so.22.1+0x14cec8a)
#9 0x00007fb5aa2cdc38 clang::ASTWriter::WriteDecl(clang::ASTContext&, clang::Decl*) (/usr/lib/libclang-cpp.so.22.1+0x14cdc38)
#10 0x00007fb5aa2cccb8 clang::ASTWriter::WriteDeclAndTypes(clang::ASTContext&) (/usr/lib/libclang-cpp.so.22.1+0x14cccb8)
#11 0x00007fb5aa2bcef1 clang::ASTWriter::WriteASTCore(clang::Sema*, llvm::StringRef, clang::Module*) (/usr/lib/libclang-cpp.so.22.1+0x14bcef1)
#12 0x00007fb5aa67d1c7 clang::ASTWriter::WriteAST(llvm::PointerUnion, llvm::StringRef, clang::Module*, llvm::StringRef, bool) (/usr/lib/libclang-cpp.so.22.1+0x187d1c7)
#13 0x00007fb5aa67cfed clang::PCHGenerator::HandleTranslationUnit(clang::ASTContext&) (/usr/lib/libclang-cpp.so.22.1+0x187cfed)
#14 0x00007fb5abb7ce05 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/lib/libclang-cpp.so.22.1+0x2d7ce05)
#15 0x00007fb5a9fa51c8 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/libclang-cpp.so.22.1+0x11a51c8)
#16 0x00007fb5aa287dfe clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/libclang-cpp.so.22.1+0x1487dfe)
#17 0x00007fb5aa28758a clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/libclang-cpp.so.22.1+0x148758a)
#18 0x000055ecc141c280 cc1_main(llvm::ArrayRef, char const*, void*) (/usr/bin/clang-cl+0x11280)
#19 0x000055ecc141b679 (/usr/bin/clang-cl+0x10679)
#20 0x000055ecc1419833 clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang-cl+0xe833)
#21 0x000055ecc141954b main (/usr/bin/clang-cl+0xe54b)
#22 0x00007fb59f627c8e (/usr/lib/libc.so.6+0x27c8e)
#23 0x00007fb59f627dcb __libc_start_main (/usr/lib/libc.so.6+0x27dcb)
#24 0x000055ecc141f1d5 _start (/usr/bin/clang-cl+0x141d5)
clang-cl: error: unable to execute command: Segmentation fault (core dumped)
clang-cl: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 22.1.8
Target: x86_64-w64-windows-msvc
Thread model: posix
InstalledDir: /usr/bin
clang-cl: warning: -fdelayed-template-parsing is deprecated after C++20 [-Wdelayed-template-parsing-in-cxx20]
clang-cl: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-cl: note: diagnostic msg: /tmp/cmake_pch-e1342b.cpp
clang-cl: note: diagnostic msg: /tmp/cmake_pch-e1342b.sh
clang-cl: note: diagnostic msg:
********************
```
[cmake_pch-e1342b.cpp](https://github.com/user-attachments/files/30853964/cmake_pch-e1342b.cpp)
[cmake_pch-e1342b.sh](https://github.com/user-attachments/files/30853965/cmake_pch-e1342b.sh)
Contributor guide
Research direction
Reproduce the CMake precompiled-header build using the clang-cl command in the report, focusing on cmake_pch.cxx and the crash at MSVC's xmemory:624 while serializing fmt allocator code. Use the included stack dump to trace the AST/PCH serialization path; done means the failure is reduced or the compiler crash is prevented and the behavior is covered by a reproducible report or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100