<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/152854>152854</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang][module] clang++ frontend crashes when compiling module
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
anonymouspc
</td>
</tr>
</table>
<pre>
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: /opt/clang/bin/clang++ -std=c++26 -Wall -fdiagnostics-color=always -fprebuilt-module-path=./bin/debug/module -g -O0 -DDEBUG -fno-inline -I ./bin/debug/package/stdexec/install/include -I ./bin/debug/package/boost/install/include -I ./bin/debug/package/plf/install/include -D abstract=0 -D extends=: -D in=: -D self=(*this) --precompile -x c++-module ./module/exec.cpp -o ./bin/debug/module/exec.pcm
1. <eof> parser at end of file
2. ./bin/debug/package/stdexec/install/include/exec/../stdexec/__detail/__basic_sender.hpp:320:9: serializing '(lambda at ./bin/debug/package/stdexec/install/include/exec/../stdexec/__detail/__basic_sender.hpp:320:9)'
#0 0x000000010746bfdc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/clang/bin/clang-22+0x105207fdc)
#1 0x000000010746c560 PrintStackTraceSignalHandler(void*) (/opt/clang/bin/clang-22+0x105208560)
#2 0x0000000107469f7c llvm::sys::RunSignalHandlers() (/opt/clang/bin/clang-22+0x105205f7c)
#3 0x000000010746b808 llvm::sys::CleanupOnSignal(unsigned long) (/opt/clang/bin/clang-22+0x105207808)
#4 0x0000000107327a64 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) (/opt/clang/bin/clang-22+0x1050c3a64)
#5 0x0000000107327f20 CrashRecoverySignalHandler(int) (/opt/clang/bin/clang-22+0x1050c3f20)
#6 0x0000000197fa8704 (/usr/lib/system/libsystem_platform.dylib+0x1804d4704)
#7 0x0000000197f9e848 (/usr/lib/system/libsystem_pthread.dylib+0x1804ca848)
#8 0x0000000197ea4808 (/usr/lib/system/libsystem_c.dylib+0x1803d0808)
#9 0x0000000197ea3a3c (/usr/lib/system/libsystem_c.dylib+0x1803cfa3c)
#10 0x000000010c44dfc4 getLambdaCallOperatorHelper(clang::CXXRecordDecl const&) (/opt/clang/bin/clang-22+0x10a1e9fc4)
#11 0x000000010c44e11c clang::CXXRecordDecl::getLambdaCallOperator() const (/opt/clang/bin/clang-22+0x10a1ea11c)
#12 0x000000010943a618 clang::ASTDeclWriter::VisitCXXRecordDecl(clang::CXXRecordDecl*) (/opt/clang/bin/clang-22+0x1071d6618)
#13 0x0000000109430b14 clang::declvisitor::Base<std::__1::add_pointer, clang::ASTDeclWriter, void>::Visit(clang::Decl*) (/opt/clang/bin/clang-22+0x1071ccb14)
#14 0x00000001094304f4 clang::ASTDeclWriter::Visit(clang::Decl*) (/opt/clang/bin/clang-22+0x1071cc4f4)
#15 0x00000001094423ec clang::ASTWriter::WriteDecl(clang::ASTContext&, clang::Decl*) (/opt/clang/bin/clang-22+0x1071de3ec)
#16 0x0000000109391574 clang::ASTWriter::WriteDeclAndTypes(clang::ASTContext&) (/opt/clang/bin/clang-22+0x10712d574)
#17 0x000000010938d0b8 clang::ASTWriter::WriteASTCore(clang::Sema*, llvm::StringRef, clang::Module*) (/opt/clang/bin/clang-22+0x1071290b8)
#18 0x000000010938c4f4 clang::ASTWriter::WriteAST(llvm::PointerUnion<clang::Sema*, clang::Preprocessor*>, llvm::StringRef, clang::Module*, llvm::StringRef, bool) (/opt/clang/bin/clang-22+0x1071284f4)
#19 0x000000010946a3f0 clang::PCHGenerator::HandleTranslationUnit(clang::ASTContext&) (/opt/clang/bin/clang-22+0x1072063f0)
#20 0x000000010946a70c clang::CXX20ModulesGenerator::HandleTranslationUnit(clang::ASTContext&) (/opt/clang/bin/clang-22+0x10720670c)
#21 0x0000000109075be8 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/clang/bin/clang-22+0x106e11be8)
#22 0x000000010aaaf308 clang::ParseAST(clang::Sema&, bool, bool) (/opt/clang/bin/clang-22+0x10884b308)
#23 0x0000000109026470 clang::ASTFrontendAction::ExecuteAction() (/opt/clang/bin/clang-22+0x106dc2470)
#24 0x0000000109025cb4 clang::FrontendAction::Execute() (/opt/clang/bin/clang-22+0x106dc1cb4)
#25 0x0000000108f40cf0 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/clang/bin/clang-22+0x106cdccf0)
#26 0x000000010915c894 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/clang/bin/clang-22+0x106ef8894)
#27 0x000000010227465c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/clang/bin/clang-22+0x10001065c)
#28 0x00000001022676bc ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) (/opt/clang/bin/clang-22+0x1000036bc)
#29 0x0000000102273300 clang_main(int, char**, llvm::ToolContext const&)::$_0::operator()(llvm::SmallVectorImpl<char const*>&) const (/opt/clang/bin/clang-22+0x10000f300)
#30 0x00000001022732d0 int llvm::function_ref<int (llvm::SmallVectorImpl<char const*>&)>::callback_fn<clang_main(int, char**, llvm::ToolContext const&)::$_0>(long, llvm::SmallVectorImpl<char const*>&) (/opt/clang/bin/clang-22+0x10000f2d0)
#31 0x0000000108c5d938 llvm::function_ref<int (llvm::SmallVectorImpl<char const*>&)>::operator()(llvm::SmallVectorImpl<char const*>&) const (/opt/clang/bin/clang-22+0x1069f9938)
#32 0x0000000108c5d8f8 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const::$_0::operator()() const (/opt/clang/bin/clang-22+0x1069f98f8)
#33 0x0000000108c5d8c4 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const::$_0>(long) (/opt/clang/bin/clang-22+0x1069f98c4)
#34 0x0000000105615dc8 llvm::function_ref<void ()>::operator()() const (/opt/clang/bin/clang-22+0x1033b1dc8)
#35 0x00000001073278bc llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/clang/bin/clang-22+0x1050c38bc)
#36 0x0000000108c5af28 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const (/opt/clang/bin/clang-22+0x1069f6f28)
#37 0x0000000108bf8428 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/clang/bin/clang-22+0x106994428)
#38 0x0000000108bf869c clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&, bool) const (/opt/clang/bin/clang-22+0x10699469c)
#39 0x0000000108c157fc clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&) (/opt/clang/bin/clang-22+0x1069b17fc)
#40 0x0000000102266e4c clang_main(int, char**, llvm::ToolContext const&) (/opt/clang/bin/clang-22+0x100002e4c)
#41 0x000000010229bc14 main (/opt/clang/bin/clang-22+0x100037c14)
#42 0x0000000197be1924
clang++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
clang version 22.0.0git (https://github.com/llvm/llvm-project 229ab5aa2b11bb8738db2810677abfc89050ad80)
Target: arm64-apple-darwin25.0.0
Thread model: posix
InstalledDir: /opt/clang/bin
Build config: +unoptimized, +assertions
clang++: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /var/folders/_r/bpm2q__j3qq1mjwkhmrrcz6r0000gn/T/exec-c1b9a6.cppm
clang++: note: diagnostic msg: /var/folders/_r/bpm2q__j3qq1mjwkhmrrcz6r0000gn/T/exec-c1b9a6.sh
clang++: note: diagnostic msg: Crash backtrace is located in
clang++: note: diagnostic msg: /Users/anonymous/Library/Logs/DiagnosticReports/clang-22_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang++: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang++: note: diagnostic msg:
********************
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsWltz3KjW_TXyC9VdCHR98IPc7Y5zyvnsip0zk6cuBKibiSQ0gBx7fv1XSLJb9MVjOTmTl3G5qnXhsvZi7b0BQbQWm5rzcy-88MLlGWnNVqpzUsv6qZKtbuhZLtnT-e31ZXZ3CXSbV8IAAvJ2AxRvpDLASLA1ptEezjy08tBqI8y2zedUVh5aleXD88-sUfIPTo2HVkLrlmsPrQCpGRA1LVvGgdlyQBXRW5AT-s0oQrmHFqBRvFGScq05A1q2qn9saxKtJRXEcAZUWwNNlWjM3IPZnSH0G2Bt1VhYMINz0P3dKrlRpAJEbdqK18aiBh5aycbCoiWpNx5a5aLe3V146ALMtGEeXtL-FkVg9hspSzArmCCbWmojqJ5RWUrl4SUpv5MnDWZFo3jeitLMKsnaks8aYrYeXs5fumA8b22H_Xsw24DZDQSz5fLy4ssHMCtqORN1KWoOZh_BYbWG0G9kwz200obxR04ttbU2pCy7q57Wv6maS6nNeyo2ZXG82hKQXNvhMx5eWnMAfzS8ZtrDS8v3bAlEvbvWvCzsHUo8lJmt0B5KwWzWKE5l1QjLyyMYmB-Y7HD1lx5aWcvntGnATB4B7BZraOXBzB_k4OEFl4WHL0FDlOYKEAN4zYAsQCFK7sEMzd_L-9Cjh1bzuVNyvWbcEFF2lznRgq41rxlX821j5YoR9HCWWnY0V4KU4i9Rb4CHYg8lJalyRizOXwULpRYJtG6DIYCPsP_zYRxEecEo6FweZx7O9JPuL26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