llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.22k stars 11.65k forks source link

clang-cl terminated by signal #106915

Closed R-Goc closed 3 weeks ago

R-Goc commented 4 weeks ago

This is the crash report, as asked by the text. This was a local build of LLVM, from git, around a month ago. Most tests passed after the build, here are the few that didn't:

********************
Failed Tests (24):
  AddressSanitizer-x86_64-windows-dynamic :: TestCases/Windows/delay_dbghelp.cpp
  BOLT :: X86/bolt-address-translation-yaml.test
  BOLT :: X86/dwarf4-ftypes-dwp-input-dwo-output.test
  BOLT :: X86/end-symbol.test
  BOLT :: X86/infer_no_exits.test
  BOLT :: X86/is-strip.s
  BOLT :: X86/register-fragments-bolt-symbols.s
  BOLT :: lsda-section-name.cpp
  BOLT :: yaml-profile-kind.c
  Clang :: Preprocessor/macro-multiline.c
  Clang Tools :: clang-tidy/infrastructure/config-files.cpp
  LLVM :: tools/yaml2obj/ELF/header-elfdatanone.yaml
  ORC-x86_64-windows :: TestCases/Windows/x86-64/hello-world.c
  ORC-x86_64-windows :: TestCases/Windows/x86-64/hello-world.cpp
  ORC-x86_64-windows :: TestCases/Windows/x86-64/priority-static-initializer-three.c
  ORC-x86_64-windows :: TestCases/Windows/x86-64/priority-static-initializer.c
  ORC-x86_64-windows :: TestCases/Windows/x86-64/sehframe-handling.cpp
  ORC-x86_64-windows :: TestCases/Windows/x86-64/static-initializer.S
  ORC-x86_64-windows :: TestCases/Windows/x86-64/static-initializer.cpp
  ORC-x86_64-windows :: TestCases/Windows/x86-64/trivial-atexit.c
  ORC-x86_64-windows :: TestCases/Windows/x86-64/trivial-jit-dlopen.c
  libFuzzer-x86_64-default-Windows :: fuzzer-implicit-signed-integer-truncation-or-sign-change.test
  lit :: shtest-format.py
  lldb-shell :: Unwind/windows-unaligned-x86_64.test

Testing Time: 1097.37s

Total Discovered Tests: 110016
  Skipped          :   365 (0.33%)
  Unsupported      : 36625 (33.29%)
  Passed           : 72833 (66.20%)
  Passed With Retry:     1 (0.00%)
  Expectedly Failed:   163 (0.15%)
  Timed Out        :     5 (0.00%)
  Failed           :    24 (0.02%)

14 warning(s) in tests

Crash text:

[159/2484] Building CXX object 3rdparty\protobuf\CMakeFiles\libprotobuf.dir\src\google\protobuf\descriptor.cc.obj
FAILED: 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.cc.obj
sccache C:\Users\rysza\bin\LLVM\bin\clang-cl.exe  /nologo -TP -D_CRT_SECURE_NO_WARNINGS=1 -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\Users\rysza\lib\opencv\build\3rdparty\ippicv\ippicv_win\icv\include -IC:\Users\rysza\lib\opencv\build\3rdparty\ippicv\ippicv_win\iw\include -IC:\Users\rysza\lib\opencv\build -imsvcC:\Users\rysza\lib\opencv\3rdparty\protobuf\src -imsvc"C:\Program Files (x86)\Intel\oneAPI\mkl\latest\include" /DWIN32 /D_WINDOWS /W3 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise -W -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-long-long -Qunused-arguments /FS  -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mavx2 -mfma /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4127 /wd4100 /wd4512 /wd4125 /wd4389 /wd4510 /wd4610 /wd4702 /wd4456 /wd4457 /wd4065 /wd4310 /wd4661 /wd4506 /wd4701 /wd4703 /wd4505  /O2 /Ob2 /DNDEBUG  -DNDEBUG -MD /showIncludes /Fo3rdparty\protobuf\CMakeFiles\libprotobuf.dir\src\google\protobuf\descriptor.cc.obj /Fd3rdparty\lib\libprotobuf.pdb -c -- C:\Users\rysza\lib\opencv\3rdparty\protobuf\src\google\protobuf\descriptor.cc
C:\Users\rysza\lib\opencv\3rdparty\protobuf\src\google\protobuf\descriptor.cc(7905,14): warning: declaration shadows a local variable [-Wshadow]
 7905 |       Symbol result = file()->pool()->CrossLinkOnDemandHelper(name, true);
      |              ^
C:\Users\rysza\lib\opencv\3rdparty\protobuf\src\google\protobuf\descriptor.cc(7883,10): note: previous declaration is here
 7883 |   Symbol result = file()->pool()->CrossLinkOnDemandHelper(
      |          ^
C:\Users\rysza\lib\opencv\3rdparty\protobuf\src\google\protobuf\descriptor.cc(553,23): warning: unused variable 'bucket_size' [-Wunused-const-variable]
  553 |   static const size_t bucket_size = 4;
      |                       ^~~~~~~~~~~
C:\Users\rysza\lib\opencv\3rdparty\protobuf\src\google\protobuf\descriptor.cc(554,23): warning: unused variable 'min_buckets' [-Wunused-const-variable]
  554 |   static const size_t min_buckets = 8;
      |                       ^~~~~~~~~~~
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: C:\\Users\\rysza\\bin\\LLVM\\bin\\clang-cl.exe -c -Fo3rdparty\\protobuf\\CMakeFiles\\libprotobuf.dir\\src\\google\\protobuf\\descriptor.cc.obj -D_CRT_SECURE_NO_WARNINGS=1 -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\\Users\\rysza\\lib\\opencv\\build\\3rdparty\\ippicv\\ippicv_win\\icv\\include -IC:\\Users\\rysza\\lib\\opencv\\build\\3rdparty\\ippicv\\ippicv_win\\iw\\include -IC:\\Users\\rysza\\lib\\opencv\\build -imsvcC:\\Users\\rysza\\lib\\opencv\\3rdparty\\protobuf\\src "-imsvcC:\\Program Files (x86)\\Intel\\oneAPI\\mkl\\latest\\include" /DWIN32 /D_WINDOWS /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /D_SCL_SECURE_NO_WARNINGS /DNDEBUG -DNDEBUG /showIncludes /nologo -TP /W3 /GR /Gy /bigobj /Oi /fp:precise -W -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-long-long -Qunused-arguments -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mavx2 -mfma /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4127 /wd4100 /wd4512 /wd4125 /wd4389 /wd4510 /wd4610 /wd4702 /wd4456 /wd4457 /wd4065 /wd4310 /wd4661 /wd4506 /wd4701 /wd4703 /wd4505 /O2 /Ob2 -MD /Fd3rdparty\\lib\\libprotobuf.pdb -- C:\\Users\\rysza\\lib\\opencv\\3rdparty\\protobuf\\src\\google\\protobuf\\descriptor.cc
1.<eof> parser at end of file
2.Code generation
3.Running pass 'Function Pass Manager' on module 'C:\Users\rysza\lib\opencv\3rdparty\protobuf\src\google\protobuf\descriptor.cc'.
4.Running pass 'X86 DAG->DAG Instruction Selection' on function '@"?AddPackage@DescriptorBuilder@protobuf@google@@AEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVMessage@23@PEAVFileDescriptor@23@@Z"'
Exception Code: 0xC0000005
 #0 0x00007ff6b6b90025 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x1620025)
 #1 0x00007ff6b6b85c1c (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x1615c1c)
 #2 0x00007ff6b5c0036c (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x69036c)
 #3 0x00007ff6b6b84ac8 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x1614ac8)
 #4 0x00007ff6b5b491a3 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x5d91a3)
 #5 0x00007ff6b5765e3d (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x1f5e3d)
 #6 0x00007ff6b576f403 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x1ff403)
 #7 0x00007ff6b5771896 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x201896)
 #8 0x00007ff6b6415c6b (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0xea5c6b)
 #9 0x00007ff6b67bb714 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x124b714)
#10 0x00007ff6b7fea188 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x2a7a188)
#11 0x00007ff6b66f62b8 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x11862b8)
#12 0x00007ff6b5a51cbd (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x4e1cbd)
#13 0x00007ff6b55866db (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x166db)
#14 0x00007ff6b5576be7 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x6be7)
#15 0x00007ff6b6450f4d (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0xee0f4d)
#16 0x00007ff6b6450e07 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0xee0e07)
#17 0x00007ff6b5a329b8 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x4c29b8)
#18 0x00007ff6b5575e98 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x5e98)
#19 0x00007ff6b55938be (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x238be)
#20 0x00007ff6b9e4b7e0 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x48db7e0)
#21 0x00007ffed38b257d (C:\Windows\System32\KERNEL32.DLL+0x1257d)
#22 0x00007ffed4c4af28 (C:\Windows\SYSTEM32\ntdll.dll+0x5af28)
clang-cl: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 20.0.0git (https://github.com/llvm/llvm-project.git 4db37a49a72bb9cff7a78e77439008c058383099)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Users\rysza\bin\LLVM\bin
clang-cl: note: diagnostic msg:

descriptor-236805.cpp.txt descriptor-236805.sh.txt

R-Goc commented 4 weeks ago

It does that every time I tested

R-Goc commented 3 weeks ago

current ICX-cl does compile.

R-Goc commented 3 weeks ago

here is a stack trace from a debug build of llvm:

Assertion failed: !NodePtr->isKnownSentinel(), file C:\Users\rysza\lib\llvm-project\llvm\include\llvm/ADT/ilist_iterator.h, line 168
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: C:\\Users\\rysza\\bin\\LLVM-dbg\\bin\\clang-cl.exe -cc1 -triple x86_64-pc-windows-msvc19.42.34226 -emit-obj -mincremental-linker-compatible -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name descriptor.cc -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 x86-64 -target-feature +sse3 -target-feature +ssse3 -target-feature +sse4.1 -target-feature +popcnt -target-feature +sse4.2 -target-feature +avx -target-feature +f16c -target-feature +avx2 -target-feature +fma -mllvm -x86-asm-syntax=intel -tune-cpu
generic -D_MT -D_DLL --dependent-lib=msvcrt --dependent-lib=oldnames --show-includes -sys-header-deps -stack-protector 2 -fcxx-exceptions -fexceptions -fasync-exceptions -fdiagnostics-format msvc -fdebug-compilation-dir=C:\\Users\\rysza\\lib\\opencv\\build -ffunction-sections -fcoverage-compilation-dir=C:\\Users\\rysza\\lib\\opencv\\build -D _CRT_SECURE_NO_WARNINGS=1 -D _VARIADIC_MAX=10 -D _WIN32_WINNT=0x0601 -D WIN32 -D _WINDOWS -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE -D _SCL_SECURE_NO_WARNINGS -D NDEBUG -D NDEBUG -O3 -Wall -W -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-long-long -Wno-sign-compare -Wno-deprecated-declarations -Wno-unused-parameter -fdeprecated-macro -ferror-limit 19 -fno-use-cxa-atexit -fms-extensions -fms-compatibility -fms-compatibility-version=19.42.34226 -std=c++14 -finline-functions -fskip-odr-check-in-gmf -fdelayed-template-parsing -vectorize-loops -vectorize-slp -faddrsig -x c++ descriptor-236805.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'descriptor-236805.cpp'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@"?AddPackage@DescriptorBuilder@protobuf@google@@AEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVMessage@23@PEAVFileDescriptor@23@@Z"'
Exception Code: 0xC000001D
 #0 0x00007ff7a15112fc HandleAbort C:\Users\rysza\lib\llvm-project\llvm\lib\Support\Windows\Signals.inc:429:0
 #1 0x00007ffafd6190ed (C:\Windows\SYSTEM32\ucrtbased.dll+0xa90ed)
 #2 0x00007ffafd61ae49 (C:\Windows\SYSTEM32\ucrtbased.dll+0xaae49)
 #3 0x00007ffafd621345 (C:\Windows\SYSTEM32\ucrtbased.dll+0xb1345)
 #4 0x00007ffafd620bd7 (C:\Windows\SYSTEM32\ucrtbased.dll+0xb0bd7)
 #5 0x00007ffafd61eba1 (C:\Windows\SYSTEM32\ucrtbased.dll+0xaeba1)
 #6 0x00007ffafd6218af (C:\Windows\SYSTEM32\ucrtbased.dll+0xb18af)
 #7 0x00007ff7a10e561c llvm::ilist_iterator<struct llvm::ilist_detail::node_options<class llvm::MachineInstr, 1, 1, void, 0, void>, 0, 0>::operator*(void) const C:\Users\rysza\lib\llvm-project\llvm\include\llvm\ADT\ilist_iterator.h:169:0
 #8 0x00007ff7a18da8f3 llvm::MachineInstrBundleIterator<class llvm::MachineInstr, 0>::operator*(void) const C:\Users\rysza\lib\llvm-project\llvm\include\llvm\CodeGen\MachineInstrBundleIterator.h:178:0
 #9 0x00007ff7a3ba5f93 llvm::SelectionDAGISel::reportIPToStateForBlocks(class llvm::MachineFunction *) C:\Users\rysza\lib\llvm-project\llvm\lib\CodeGen\SelectionDAG\SelectionDAGISel.cpp:1479:0
#10 0x00007ff7a3ba1f27 llvm::SelectionDAGISel::SelectAllBasicBlocks(class llvm::Function const &) C:\Users\rysza\lib\llvm-project\llvm\lib\CodeGen\SelectionDAG\SelectionDAGISel.cpp:1911:0
#11 0x00007ff7a3b9eed6 llvm::SelectionDAGISel::runOnMachineFunction(class llvm::MachineFunction &) C:\Users\rysza\lib\llvm-project\llvm\lib\CodeGen\SelectionDAG\SelectionDAGISel.cpp:614:0
#12 0x00007ff7a1b2e019 `anonymous namespace'::X86DAGToDAGISel::runOnMachineFunction C:\Users\rysza\lib\llvm-project\llvm\lib\Target\X86\X86ISelDAGToDAG.cpp:190:0
#13 0x00007ff7a3b9d910 llvm::SelectionDAGISelLegacy::runOnMachineFunction(class llvm::MachineFunction &) C:\Users\rysza\lib\llvm-project\llvm\lib\CodeGen\SelectionDAG\SelectionDAGISel.cpp:374:0
#14 0x00007ff7a1a5388d llvm::MachineFunctionPass::runOnFunction(class llvm::Function &) C:\Users\rysza\lib\llvm-project\llvm\lib\CodeGen\MachineFunctionPass.cpp:94:0
#15 0x00007ff7a113dbe1 llvm::FPPassManager::runOnFunction(class llvm::Function &) C:\Users\rysza\lib\llvm-project\llvm\lib\IR\LegacyPassManager.cpp:1408:0
#16 0x00007ff7a1142e0d llvm::FPPassManager::runOnModule(class llvm::Module &) C:\Users\rysza\lib\llvm-project\llvm\lib\IR\LegacyPassManager.cpp:1454:0
#17 0x00007ff7a113e635 `anonymous namespace'::MPPassManager::runOnModule C:\Users\rysza\lib\llvm-project\llvm\lib\IR\LegacyPassManager.cpp:1523:0
#18 0x00007ff7a113e105 llvm::legacy::PassManagerImpl::run(class llvm::Module &) C:\Users\rysza\lib\llvm-project\llvm\lib\IR\LegacyPassManager.cpp:541:0
#19 0x00007ff7a1143131 llvm::legacy::PassManager::run(class llvm::Module &) C:\Users\rysza\lib\llvm-project\llvm\lib\IR\LegacyPassManager.cpp:1650:0
#20 0x00007ff7a2ae1527 `anonymous namespace'::EmitAssemblyHelper::RunCodegenPipeline C:\Users\rysza\lib\llvm-project\clang\lib\CodeGen\BackendUtil.cpp:1162:0
#21 0x00007ff7a2ada3c0 `anonymous namespace'::EmitAssemblyHelper::EmitAssembly C:\Users\rysza\lib\llvm-project\clang\lib\CodeGen\BackendUtil.cpp:1185:0
#22 0x00007ff7a2ad9314 clang::EmitBackendOutput(class clang::DiagnosticsEngine &, class clang::HeaderSearchOptions const &, class clang::CodeGenOptions const &, class clang::TargetOptions const &, class clang::LangOptions const &, class llvm::StringRef, class llvm::Module *, enum clang::BackendAction, class llvm::IntrusiveRefCntPtr<class llvm::vfs::FileSystem>, class std::unique_ptr<class llvm::raw_pwrite_stream, struct std::default_delete<class llvm::raw_pwrite_stream>>, class clang::BackendConsumer *) C:\Users\rysza\lib\llvm-project\clang\lib\CodeGen\BackendUtil.cpp:1347:0
#23 0x00007ff7a3473acb clang::BackendConsumer::HandleTranslationUnit(class clang::ASTContext &) C:\Users\rysza\lib\llvm-project\clang\lib\CodeGen\CodeGenAction.cpp:354:0
#24 0x00007ff7a65eed47 clang::ParseAST(class clang::Sema &, bool, bool) C:\Users\rysza\lib\llvm-project\clang\lib\Parse\ParseAST.cpp:184:0
#25 0x00007ff7a320d97d clang::ASTFrontendAction::ExecuteAction(void) C:\Users\rysza\lib\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1194:0
#26 0x00007ff7a3478beb clang::CodeGenAction::ExecuteAction(void) C:\Users\rysza\lib\llvm-project\clang\lib\CodeGen\CodeGenAction.cpp:1146:0
#27 0x00007ff7a320d2a4 clang::FrontendAction::Execute(void) C:\Users\rysza\lib\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1082:0
#28 0x00007ff7a178c962 clang::CompilerInstance::ExecuteAction(class clang::FrontendAction &) C:\Users\rysza\lib\llvm-project\clang\lib\Frontend\CompilerInstance.cpp:1061:0
#29 0x00007ff7a18ab0bf clang::ExecuteCompilerInvocation(class clang::CompilerInstance *) C:\Users\rysza\lib\llvm-project\clang\lib\FrontendTool\ExecuteCompilerInvocation.cpp:280:0
#30 0x00007ff7a0d3189a cc1_main(class llvm::ArrayRef<char const *>, char const *, void *) C:\Users\rysza\lib\llvm-project\clang\tools\driver\cc1_main.cpp:285:0
#31 0x00007ff7a0d22ce8 ExecuteCC1Tool C:\Users\rysza\lib\llvm-project\clang\tools\driver\driver.cpp:215:0
#32 0x00007ff7a0d2150e clang_main(int, char **, struct llvm::ToolContext const &) C:\Users\rysza\lib\llvm-project\clang\tools\driver\driver.cpp:256:0
#33 0x00007ff7a0d5b161 main C:\Users\rysza\lib\llvm-project\build\tools\clang\tools\driver\clang-driver.cpp:17:0
#34 0x00007ff7ab45f479 invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79:0
#35 0x00007ff7ab45f5b2 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0
#36 0x00007ff7ab45f63e __scrt_common_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331:0
#37 0x00007ff7ab45f65e mainCRTStartup D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17:0
#38 0x00007ffb8574257d (C:\Windows\System32\KERNEL32.DLL+0x1257d)
#39 0x00007ffb86a8af28 (C:\Windows\SYSTEM32\ntdll.dll+0x5af28)
llvmbot commented 3 weeks ago

@llvm/issue-subscribers-backend-x86

Author: None (R-Goc)

This is the crash report, as asked by the text. This was a local build of LLVM, from git, around a month ago. Most tests passed after the build, here are the few that didn't: ``` ******************** Failed Tests (24): AddressSanitizer-x86_64-windows-dynamic :: TestCases/Windows/delay_dbghelp.cpp BOLT :: X86/bolt-address-translation-yaml.test BOLT :: X86/dwarf4-ftypes-dwp-input-dwo-output.test BOLT :: X86/end-symbol.test BOLT :: X86/infer_no_exits.test BOLT :: X86/is-strip.s BOLT :: X86/register-fragments-bolt-symbols.s BOLT :: lsda-section-name.cpp BOLT :: yaml-profile-kind.c Clang :: Preprocessor/macro-multiline.c Clang Tools :: clang-tidy/infrastructure/config-files.cpp LLVM :: tools/yaml2obj/ELF/header-elfdatanone.yaml ORC-x86_64-windows :: TestCases/Windows/x86-64/hello-world.c ORC-x86_64-windows :: TestCases/Windows/x86-64/hello-world.cpp ORC-x86_64-windows :: TestCases/Windows/x86-64/priority-static-initializer-three.c ORC-x86_64-windows :: TestCases/Windows/x86-64/priority-static-initializer.c ORC-x86_64-windows :: TestCases/Windows/x86-64/sehframe-handling.cpp ORC-x86_64-windows :: TestCases/Windows/x86-64/static-initializer.S ORC-x86_64-windows :: TestCases/Windows/x86-64/static-initializer.cpp ORC-x86_64-windows :: TestCases/Windows/x86-64/trivial-atexit.c ORC-x86_64-windows :: TestCases/Windows/x86-64/trivial-jit-dlopen.c libFuzzer-x86_64-default-Windows :: fuzzer-implicit-signed-integer-truncation-or-sign-change.test lit :: shtest-format.py lldb-shell :: Unwind/windows-unaligned-x86_64.test Testing Time: 1097.37s Total Discovered Tests: 110016 Skipped : 365 (0.33%) Unsupported : 36625 (33.29%) Passed : 72833 (66.20%) Passed With Retry: 1 (0.00%) Expectedly Failed: 163 (0.15%) Timed Out : 5 (0.00%) Failed : 24 (0.02%) 14 warning(s) in tests ``` Crash text: ``` [159/2484] Building CXX object 3rdparty\protobuf\CMakeFiles\libprotobuf.dir\src\google\protobuf\descriptor.cc.obj FAILED: 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.cc.obj sccache C:\Users\rysza\bin\LLVM\bin\clang-cl.exe /nologo -TP -D_CRT_SECURE_NO_WARNINGS=1 -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\Users\rysza\lib\opencv\build\3rdparty\ippicv\ippicv_win\icv\include -IC:\Users\rysza\lib\opencv\build\3rdparty\ippicv\ippicv_win\iw\include -IC:\Users\rysza\lib\opencv\build -imsvcC:\Users\rysza\lib\opencv\3rdparty\protobuf\src -imsvc"C:\Program Files (x86)\Intel\oneAPI\mkl\latest\include" /DWIN32 /D_WINDOWS /W3 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise -W -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-long-long -Qunused-arguments /FS -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mavx2 -mfma /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4127 /wd4100 /wd4512 /wd4125 /wd4389 /wd4510 /wd4610 /wd4702 /wd4456 /wd4457 /wd4065 /wd4310 /wd4661 /wd4506 /wd4701 /wd4703 /wd4505 /O2 /Ob2 /DNDEBUG -DNDEBUG -MD /showIncludes /Fo3rdparty\protobuf\CMakeFiles\libprotobuf.dir\src\google\protobuf\descriptor.cc.obj /Fd3rdparty\lib\libprotobuf.pdb -c -- C:\Users\rysza\lib\opencv\3rdparty\protobuf\src\google\protobuf\descriptor.cc C:\Users\rysza\lib\opencv\3rdparty\protobuf\src\google\protobuf\descriptor.cc(7905,14): warning: declaration shadows a local variable [-Wshadow] 7905 | Symbol result = file()->pool()->CrossLinkOnDemandHelper(name, true); | ^ C:\Users\rysza\lib\opencv\3rdparty\protobuf\src\google\protobuf\descriptor.cc(7883,10): note: previous declaration is here 7883 | Symbol result = file()->pool()->CrossLinkOnDemandHelper( | ^ C:\Users\rysza\lib\opencv\3rdparty\protobuf\src\google\protobuf\descriptor.cc(553,23): warning: unused variable 'bucket_size' [-Wunused-const-variable] 553 | static const size_t bucket_size = 4; | ^~~~~~~~~~~ C:\Users\rysza\lib\opencv\3rdparty\protobuf\src\google\protobuf\descriptor.cc(554,23): warning: unused variable 'min_buckets' [-Wunused-const-variable] 554 | static const size_t min_buckets = 8; | ^~~~~~~~~~~ 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: C:\\Users\\rysza\\bin\\LLVM\\bin\\clang-cl.exe -c -Fo3rdparty\\protobuf\\CMakeFiles\\libprotobuf.dir\\src\\google\\protobuf\\descriptor.cc.obj -D_CRT_SECURE_NO_WARNINGS=1 -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\\Users\\rysza\\lib\\opencv\\build\\3rdparty\\ippicv\\ippicv_win\\icv\\include -IC:\\Users\\rysza\\lib\\opencv\\build\\3rdparty\\ippicv\\ippicv_win\\iw\\include -IC:\\Users\\rysza\\lib\\opencv\\build -imsvcC:\\Users\\rysza\\lib\\opencv\\3rdparty\\protobuf\\src "-imsvcC:\\Program Files (x86)\\Intel\\oneAPI\\mkl\\latest\\include" /DWIN32 /D_WINDOWS /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /D_SCL_SECURE_NO_WARNINGS /DNDEBUG -DNDEBUG /showIncludes /nologo -TP /W3 /GR /Gy /bigobj /Oi /fp:precise -W -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-long-long -Qunused-arguments -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mavx2 -mfma /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4127 /wd4100 /wd4512 /wd4125 /wd4389 /wd4510 /wd4610 /wd4702 /wd4456 /wd4457 /wd4065 /wd4310 /wd4661 /wd4506 /wd4701 /wd4703 /wd4505 /O2 /Ob2 -MD /Fd3rdparty\\lib\\libprotobuf.pdb -- C:\\Users\\rysza\\lib\\opencv\\3rdparty\\protobuf\\src\\google\\protobuf\\descriptor.cc 1.<eof> parser at end of file 2.Code generation 3.Running pass 'Function Pass Manager' on module 'C:\Users\rysza\lib\opencv\3rdparty\protobuf\src\google\protobuf\descriptor.cc'. 4.Running pass 'X86 DAG->DAG Instruction Selection' on function '@"?AddPackage@DescriptorBuilder@protobuf@google@@AEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVMessage@23@PEAVFileDescriptor@23@@Z"' Exception Code: 0xC0000005 #0 0x00007ff6b6b90025 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x1620025) #1 0x00007ff6b6b85c1c (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x1615c1c) #2 0x00007ff6b5c0036c (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x69036c) #3 0x00007ff6b6b84ac8 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x1614ac8) #4 0x00007ff6b5b491a3 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x5d91a3) #5 0x00007ff6b5765e3d (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x1f5e3d) #6 0x00007ff6b576f403 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x1ff403) #7 0x00007ff6b5771896 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x201896) #8 0x00007ff6b6415c6b (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0xea5c6b) #9 0x00007ff6b67bb714 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x124b714) #10 0x00007ff6b7fea188 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x2a7a188) #11 0x00007ff6b66f62b8 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x11862b8) #12 0x00007ff6b5a51cbd (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x4e1cbd) #13 0x00007ff6b55866db (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x166db) #14 0x00007ff6b5576be7 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x6be7) #15 0x00007ff6b6450f4d (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0xee0f4d) #16 0x00007ff6b6450e07 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0xee0e07) #17 0x00007ff6b5a329b8 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x4c29b8) #18 0x00007ff6b5575e98 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x5e98) #19 0x00007ff6b55938be (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x238be) #20 0x00007ff6b9e4b7e0 (C:\Users\rysza\bin\LLVM\bin\clang-cl.exe+0x48db7e0) #21 0x00007ffed38b257d (C:\Windows\System32\KERNEL32.DLL+0x1257d) #22 0x00007ffed4c4af28 (C:\Windows\SYSTEM32\ntdll.dll+0x5af28) clang-cl: error: clang frontend command failed due to signal (use -v to see invocation) clang version 20.0.0git (https://github.com/llvm/llvm-project.git 4db37a49a72bb9cff7a78e77439008c058383099) Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: C:\Users\rysza\bin\LLVM\bin clang-cl: note: diagnostic msg: ``` [descriptor-236805.cpp.txt](https://github.com/user-attachments/files/16829888/descriptor-236805.cpp.txt) [descriptor-236805.sh.txt](https://github.com/user-attachments/files/16829889/descriptor-236805.sh.txt)
R-Goc commented 3 weeks ago

In issue https://github.com/llvm/llvm-project/issues/105813 there is a simpler reproduction, though doesn't work for me exactly. Also there is more information there. The issue is that in the SelectionDAG::ReportIPToStateForBlocks in SelectionDAGISel.cpp:1479, which only runs when MF->getWinEHFuncInfo() returns non-null, the top-level machine instruction block returns a sentinel value when attempting to dereference, which triggers an assert in ilist_iterator.h:168