Description
It is reproduced when I run chain of commands:
D:\project\llvm-project\build64\Debug\bin\clang++.exe -std=c++20 -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include" -x c++-header "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\cstdio" -o C:\project\pch-crash\cstdio.pch
D:\project\llvm-project\build64\Debug\bin\clang++.exe -std=c++20 -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include" -x c++-header "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\cstdlib" -o C:\project\pch-crash\cstdlib.pch -include-pch C:\project\pch-crash\cstdio.pch
D:\project\llvm-project\build64\Debug\bin\clang++.exe -std=c++20 -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include" -x c++-header "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\cstring" -o C:\project\pch-crash\cstring.pch -include-pch C:\project\pch-crash\cstdlib.pch
D:\project\llvm-project\build64\Debug\bin\clang++.exe -std=c++20 -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include" -x c++-header "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\string" -o C:\project\pch-crash\string.pch -include-pch C:\project\pch-crash\cstring.pch
D:\project\llvm-project\build64\Debug\bin\clang++.exe -std=c++20 -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include" -x c++-header "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\vector" -o C:\project\pch-crash\vector.pch -include-pch C:\project\pch-crash\string.pch
D:\project\llvm-project\build64\Debug\bin\clang++.exe -std=c++20 -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include" -x c++-header "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\limits" -o C:\project\pch-crash\limits.pch -include-pch C:\project\pch-crash\vector.pch
D:\project\llvm-project\build64\Debug\bin\clang++.exe -std=c++20 -I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include" -x c++-header "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\iostream" -o C:\project\pch-crash\iostream.pch -include-pch C:\project\pch-crash\limits.pch
Note: If I use -std=c++17 instead of -std=c++20 there are no issues.
Stack dump:
0. Program arguments: D:\project\llvm-project\build64\Debug\bin\clang++.exe -std=c++20 "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include" -x c++-header "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\iostream" -o C:\project\pch-crash\iostream.pch -include-pch C:\project\pch-crash\limits.pch
Exception Code: 0xC0000005
0x00007FF6D06079B4, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x83379B4 byte(s), clang::ASTReader::getLocalModuleFile() + 0x104 byte(s), D:\project\llvm-project\clang\lib\Serialization\ASTReader.cpp, line 9090 + 0x2E byte(s)
0x00007FF6D05C9712, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x82F9712 byte(s), clang::serialization::reader::ASTDeclContextNameLookupTrait::ReadFileRef() + 0x42 byte(s), D:\project\llvm-project\clang\lib\Serialization\ASTReader.cpp, line 1213 + 0x0 byte(s)
0x00007FF6D08705FF, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x85A05FF byte(s), clang::serialization::MultiOnDiskHashTableclang::serialization::reader::ASTDeclContextNameLookupTrait::add() + 0xAF byte(s), D:\project\llvm-project\clang\lib\Serialization\MultiOnDiskHashTable.h, line 213 + 0x12 byte(s)
0x00007FF6D07EAC29, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x851AC29 byte(s), clang::ASTReader::loadDeclUpdateRecords() + 0xA59 byte(s), D:\project\llvm-project\clang\lib\Serialization\ASTReaderDecl.cpp, line 4333 + 0x0 byte(s)
0x00007FF6D05E95A8, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x83195A8 byte(s), clang::ASTReader::finishPendingActions() + 0xB98 byte(s), D:\project\llvm-project\clang\lib\Serialization\ASTReader.cpp, line 9762 + 0x0 byte(s)
0x00007FF6D06006A7, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x83306A7 byte(s), clang::ASTReader::FinishedDeserializing() + 0x97 byte(s), D:\project\llvm-project\clang\lib\Serialization\ASTReader.cpp, line 10231 + 0x0 byte(s)
0x00007FF6D06B0B43, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x83E0B43 byte(s), clang::ExternalASTSource::Deserializing::~Deserializing() + 0x23 byte(s), D:\project\llvm-project\clang\include\clang\AST\ExternalASTSource.h, line 87 + 0x0 byte(s)
0x00007FF6D05F02F6, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x83202F6 byte(s), clang::ASTReader::ReadAST() + 0x1786 byte(s), D:\project\llvm-project\clang\lib\Serialization\ASTReader.cpp, line 4670 + 0x25 byte(s)
0x00007FF6D01D26A6, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x7F026A6 byte(s), clang::CompilerInstance::createPCHExternalASTSource() + 0x636 byte(s), D:\project\llvm-project\clang\lib\Frontend\CompilerInstance.cpp, line 659 + 0x109 byte(s)
0x00007FF6D01D2041, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x7F02041 byte(s), clang::CompilerInstance::createPCHExternalASTSource() + 0x611 byte(s), D:\project\llvm-project\clang\lib\Frontend\CompilerInstance.cpp, line 615 + 0x5B7 byte(s)
0x00007FF6D020D87B, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x7F3D87B byte(s), clang::FrontendAction::BeginSourceFile() + 0x37DB byte(s), D:\project\llvm-project\clang\lib\Frontend\FrontendAction.cpp, line 999 + 0x0 byte(s)
0x00007FF6D01CE4C2, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x7EFE4C2 byte(s), clang::CompilerInstance::ExecuteAction() + 0x422 byte(s), D:\project\llvm-project\clang\lib\Frontend\CompilerInstance.cpp, line 1060 + 0x1D byte(s)
0x00007FF6D04B2320, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x81E2320 byte(s), clang::ExecuteCompilerInvocation() + 0x440 byte(s), D:\project\llvm-project\clang\lib\FrontendTool\ExecuteCompilerInvocation.cpp, line 280 + 0x1A byte(s)
0x00007FF6C88B1EED, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x5E1EED byte(s), cc1_main() + 0x9BD byte(s), D:\project\llvm-project\clang\tools\driver\cc1_main.cpp, line 284 + 0x12 byte(s)
0x00007FF6C889C0BB, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x5CC0BB byte(s), ExecuteCC1Tool() + 0x2DB byte(s), D:\project\llvm-project\clang\tools\driver\driver.cpp, line 215 + 0xA1 byte(s)
0x00007FF6C889E261, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x5CE261 byte(s), clang_main'::
43'::<lambda_1>::operator()() + 0x21 byte(s), D:\project\llvm-project\clang\tools\driver\driver.cpp, line 356 + 0x0 byte(s)
0x00007FF6C88A1EDE, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x5D1EDE byte(s), llvm::function_ref<int __cdecl(llvm::SmallVectorImpl<char const *> &)>::callback_fn<clang_main'::
43'::<lambda_1> >() + 0x1E byte(s), D:\project\llvm-project\llvm\include\llvm\ADT\STLFunctionalExtras.h, line 47 + 0x0 byte(s)
0x00007FF6CFF25F8E, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x7C55F8E byte(s), llvm::function_ref<int __cdecl(llvm::SmallVectorImpl<char const *> &)>::operator()() + 0x2E byte(s), D:\project\llvm-project\llvm\include\llvm\ADT\STLFunctionalExtras.h, line 69 + 0x0 byte(s)
0x00007FF6CFF21CD1, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x7C51CD1 byte(s), clang::driver::CC1Command::Execute'::
7'::<lambda_1>::operator()() + 0x31 byte(s), D:\project\llvm-project\clang\lib\Driver\Job.cpp, line 440 + 0x31 byte(s)
0x00007FF6CFF25114, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x7C55114 byte(s), llvm::function_ref<void __cdecl(void)>::callback_fn<clang::driver::CC1Command::Execute'::
7'::<lambda_1> >() + 0x14 byte(s), D:\project\llvm-project\llvm\include\llvm\ADT\STLFunctionalExtras.h, line 47 + 0x0 byte(s)
0x00007FF6CC7B15E4, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x44E15E4 byte(s), llvm::function_ref<void __cdecl(void)>::operator()() + 0x24 byte(s), D:\project\llvm-project\llvm\include\llvm\ADT\STLFunctionalExtras.h, line 69 + 0x0 byte(s)
0x00007FF6CE6BE93B, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x63EE93B byte(s), llvm::CrashRecoveryContext::RunSafely() + 0xAB byte(s), D:\project\llvm-project\llvm\lib\Support\CrashRecoveryContext.cpp, line 235 + 0xA byte(s)
0x00007FF6CFF1FC74, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x7C4FC74 byte(s), clang::driver::CC1Command::Execute() + 0x214 byte(s), D:\project\llvm-project\clang\lib\Driver\Job.cpp, line 440 + 0x72 byte(s)
0x00007FF6CFDD618E, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x7B0618E byte(s), clang::driver::Compilation::ExecuteCommand() + 0x44E byte(s), D:\project\llvm-project\clang\lib\Driver\Compilation.cpp, line 199 + 0x9E byte(s)
0x00007FF6CFDD640A, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x7B0640A byte(s), clang::driver::Compilation::ExecuteJobs() + 0xDA byte(s), D:\project\llvm-project\clang\lib\Driver\Compilation.cpp, line 253 + 0x20 byte(s)
0x00007FF6CFD6A64B, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x7A9A64B byte(s), clang::driver::Driver::ExecuteCompilation() + 0x2BB byte(s), D:\project\llvm-project\clang\lib\Driver\Driver.cpp, line 1943 + 0x0 byte(s)
0x00007FF6C889DE49, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x5CDE49 byte(s), clang_main() + 0x1989 byte(s), D:\project\llvm-project\clang\tools\driver\driver.cpp, line 391 + 0x25 byte(s)
0x00007FF6C88E77E5, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x6177E5 byte(s), main() + 0xA5 byte(s), D:\project\llvm-project\build64\tools\clang\tools\driver\clang-driver.cpp, line 17 + 0x4D byte(s)
0x00007FF6D8CAB2E9, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x109DB2E9 byte(s), invoke_main() + 0x39 byte(s), D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 79 + 0x0 byte(s)
0x00007FF6D8CAB1CE, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x109DB1CE byte(s), __scrt_common_main_seh() + 0x12E byte(s), D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 288 + 0x5 byte(s)
0x00007FF6D8CAB08E, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x109DB08E byte(s), __scrt_common_main() + 0xE byte(s), D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl, line 331 + 0x0 byte(s)
0x00007FF6D8CAB37E, D:\project\llvm-project\build64\Debug\bin\clang++.exe(0x00007FF6C82D0000) + 0x109DB37E byte(s), mainCRTStartup() + 0xE byte(s), D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp, line 17 + 0x0 byte(s)
0x00007FF8D8A87374, C:\Windows\System32\KERNEL32.DLL(0x00007FF8D8A70000) + 0x17374 byte(s), BaseThreadInitThunk() + 0x14 byte(s)
0x00007FF8DA87CC91, C:\Windows\SYSTEM32\ntdll.dll(0x00007FF8DA830000) + 0x4CC91 byte(s), RtlUserThreadStart() + 0x21 byte(s)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 19.1.0-rc4 (https://github.com/llvm/llvm-project.git 0c64156)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: D:\project\llvm-project\build64\Debug\bin
Build config: +unoptimized, +assertions
clang++: note: diagnostic msg:
Also attached the following files:
iostream-d10074.hh
iostream-d10074.sh
in zip:
clang-crash.zip