Skip to content

When compiling a module without a main function and without using the --precompile option, there is a probability of causing ICE #142305

Open
@hexne

Description

@hexne

Required documents:

// keyevent.cppm
module;
#include <array>
#include <string>
export module modforge.keyevent;

export
struct Key {
    inline static std::array<std::string, 256> key_map = {

        "backspace", "tab", "", "", "", "enter", "", "", 

    };
};

// CMakeLists.txt
cmake_minimum_required(VERSION 3.29)

project(modforge)

file(GLOB module_files "*.cppm")


add_library(modforge STATIC)

target_sources(modforge
        PUBLIC
        FILE_SET cxx_modules TYPE CXX_MODULES FILES
        ${module_files}
)


target_compile_features(modforge PUBLIC cxx_std_23)

Reproduction:
Use clang++ -std=c++20 keyevent.cppm The command is compiled and there is a probability of obtaining ice. The specific details are as follows:

☁  modforge clang++ -std=c++20 keyevent.cppm                             
/usr/bin/ld: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.1.1/../../../../lib64/Scrt1.o: in function `_start':
(.text+0x1b): undefined reference to `main'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
☁  modforge ls
build  CMakeLists.txt  keyevent.cppm
☁  modforge ls -a
.  ..  build  CMakeLists.txt  keyevent.cppm
☁  modforge clang++ -std=c++20 keyevent.cppm
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++ -cc1 -triple x86_64-pc-linux-gnu -emit-obj -dumpdir a- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name keyevent.cppm -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 -debugger-tuning=gdb -fdebug-compilation-dir=/home/hexne/modforge -fcoverage-compilation-dir=/home/hexne/modforge -resource-dir /usr/lib/clang/19 -std=c++20 -fdeprecated-macro -ferror-limit 19 -stack-protector 2 -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/keyevent-97b1eb.o -x pcm /tmp/keyevent-e723d6.pcm
1.      <eof> parser at end of file
2.      Code generation
 #0 0x00007f0d9a619920 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/libLLVM.so.19.1+0x819920)
 #1 0x00007f0d9a6168bd (/usr/lib/libLLVM.so.19.1+0x8168bd)
 #2 0x00007f0d9984def0 (/usr/lib/libc.so.6+0x3def0)
 #3 0x00007f0d9a8779a5 (/usr/lib/libLLVM.so.19.1+0xa779a5)
 #4 0x00007f0d9b350402 (/usr/lib/libLLVM.so.19.1+0x1550402)
 #5 0x00007f0d9b363f26 llvm::AsmPrinter::emitXXStructorList(llvm::DataLayout const&, llvm::Constant const*, bool) (/usr/lib/libLLVM.so.19.1+0x1563f26)
 #6 0x00007f0d9b35ab0f llvm::AsmPrinter::emitSpecialLLVMGlobal(llvm::GlobalVariable const*) (/usr/lib/libLLVM.so.19.1+0x155ab0f)
 #7 0x00007f0d9b363783 llvm::AsmPrinter::emitGlobalVariable(llvm::GlobalVariable const*) (/usr/lib/libLLVM.so.19.1+0x1563783)
 #8 0x00007f0d9b35d7b9 llvm::AsmPrinter::doFinalization(llvm::Module&) (/usr/lib/libLLVM.so.19.1+0x155d7b9)
 #9 0x00007f0d9a7e0c2d llvm::FPPassManager::doFinalization(llvm::Module&) (/usr/lib/libLLVM.so.19.1+0x9e0c2d)
#10 0x00007f0d9a7ed4a9 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/libLLVM.so.19.1+0x9ed4a9)
#11 0x00007f0da3d39034 llvm::TimeTraceScope::~TimeTraceScope() /usr/include/llvm/Support/TimeProfiler.h:189:0
#12 0x00007f0da3d39034 RunCodegenPipeline /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/BackendUtil.cpp:1158:0
#13 0x00007f0da3d39034 EmitAssembly /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/BackendUtil.cpp:1180:0
#14 0x00007f0da3d39034 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/BackendUtil.cpp:1341:0
#15 0x00007f0da410163a llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>::release() /usr/include/llvm/ADT/IntrusiveRefCntPtr.h:232:9
#16 0x00007f0da410163a llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>::~IntrusiveRefCntPtr() /usr/include/llvm/ADT/IntrusiveRefCntPtr.h:196:34
#17 0x00007f0da410163a clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/CodeGenAction.cpp:354:20
#18 0x00007f0da2bd9b86 __gnu_cxx::__normal_iterator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>*, std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>>::__normal_iterator(std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>* const&) /usr/include/c++/14.2.1/bits/stl_iterator.h:1068:9
#19 0x00007f0da2bd9b86 std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>::begin() /usr/include/c++/14.2.1/bits/stl_vector.h:874:16
#20 0x00007f0da2bd9b86 void clang::finalize<std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, s

☁  modforge clang++ -std=c++20 keyevent.cppm
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++ -cc1 -triple x86_64-pc-linux-gnu -emit-obj -dumpdir a- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name keyevent.cppm -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 -debugger-tuning=gdb -fdebug-compilation-dir=/home/hexne/modforge -fcoverage-compilation-dir=/home/hexne/modforge -resource-dir /usr/lib/clang/19 -std=c++20 -fdeprecated-macro -ferror-limit 19 -stack-protector 2 -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/keyevent-3146f5.o -x pcm /tmp/keyevent-d72b25.pcm
1.      <eof> parser at end of file
2.      Code generation
 #0 0x00007fa38de19920 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/libLLVM.so.19.1+0x819920)
 #1 0x00007fa38de168bd (/usr/lib/libLLVM.so.19.1+0x8168bd)
 #2 0x00007fa38d04def0 (/usr/lib/libc.so.6+0x3def0)
 #3 0x00007fa38e0779a5 (/usr/lib/libLLVM.so.19.1+0xa779a5)
 #4 0x00007fa38eb50402 (/usr/lib/libLLVM.so.19.1+0x1550402)
 #5 0x00007fa38eb63f26 llvm::AsmPrinter::emitXXStructorList(llvm::DataLayout const&, llvm::Constant const*, bool) (/usr/lib/libLLVM.so.19.1+0x1563f26)
 #6 0x00007fa38eb5ab0f llvm::AsmPrinter::emitSpecialLLVMGlobal(llvm::GlobalVariable const*) (/usr/lib/libLLVM.so.19.1+0x155ab0f)
 #7 0x00007fa38eb63783 llvm::AsmPrinter::emitGlobalVariable(llvm::GlobalVariable const*) (/usr/lib/libLLVM.so.19.1+0x1563783)
 #8 0x00007fa38eb5d7b9 llvm::AsmPrinter::doFinalization(llvm::Module&) (/usr/lib/libLLVM.so.19.1+0x155d7b9)
 #9 0x00007fa38dfe0c2d llvm::FPPassManager::doFinalization(llvm::Module&) (/usr/lib/libLLVM.so.19.1+0x9e0c2d)
#10 0x00007fa38dfed4a9 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/libLLVM.so.19.1+0x9ed4a9)
#11 0x00007fa397539034 llvm::TimeTraceScope::~TimeTraceScope() /usr/include/llvm/Support/TimeProfiler.h:189:0
#12 0x00007fa397539034 RunCodegenPipeline /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/BackendUtil.cpp:1158:0
#13 0x00007fa397539034 EmitAssembly /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/BackendUtil.cpp:1180:0
#14 0x00007fa397539034 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/BackendUtil.cpp:1341:0
#15 0x00007fa39790163a llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>::release() /usr/include/llvm/ADT/IntrusiveRefCntPtr.h:232:9
#16 0x00007fa39790163a llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>::~IntrusiveRefCntPtr() /usr/include/llvm/ADT/IntrusiveRefCntPtr.h:196:34
#17 0x00007fa39790163a clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/CodeGenAction.cpp:354:20
#18 0x00007fa3963d9b86 __gnu_cxx::__normal_iterator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>*, std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>>::__normal_iterator(std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>* const&) /usr/include/c++/14.2.1/bits/stl_iterator.h:1068:9
#19 0x00007fa3963d9b86 std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>::begin() /usr/include/c++/14.2.1/bits/stl_vector.h:874:16
#20 0x00007fa3963d9b86 void clang::finalize<std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>>(std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>&, clang::Sema const&) /usr/src/debug/clang/clang-19.1.7.src/include/clang/Sema/TemplateInstCallback.h:54:3
#21 0x00007fa3963d9b86 clang::ParseAST(clang::Sema&, bool, bool) /usr/src/debug/clang/clang-19.1.7.src/lib/Parse/ParseAST.cpp:191:11
#22 0x00007fa3981021a1 clang::FrontendAction::Execute() /usr/src/debug/clang/clang-19.1.7.src/lib/Frontend/FrontendAction.cpp:1078:21
#23 0x00007fa39809808f llvm::Error::getPtr() const /usr/include/llvm/Support/Error.h:282:12
#24 0x00007fa39809808f llvm::Error::operator bool() /usr/include/llvm/Support/Error.h:242:22
#25 0x00007fa39809808f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /usr/src/debug/clang/clang-19.1.7.src/lib/Frontend/CompilerInstance.cpp:1061:42
#26 0x00007fa39815ce85 std::__shared_ptr<clang::FrontendOptions, (__gnu_cxx::_Lock_policy)2>::get() const /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1667:0
#27 0x00007fa39815ce85 std::__shared_ptr_access<clang::FrontendOptions, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get() const /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1364:0
#28 0x00007fa39815ce85 std::__shared_ptr_access<clang::FrontendOptions, (__gnu_cxx::_Lock_policy)2, false, false>::operator*() const /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1350:0
#29 0x00007fa39815ce85 clang::CompilerInvocation::getFrontendOpts() /usr/src/debug/clang/clang-19.1.7.src/include/clang/Frontend/CompilerInvocation.h:259:0
#30 0x00007fa39815ce85 clang::CompilerInstance::getFrontendOpts() /usr/src/debug/clang/clang-19.1.7.src/include/clang/Frontend/CompilerInstance.h:312:0
#31 0x00007fa39815ce85 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /usr/src/debug/clang/clang-19.1.7.src/lib/FrontendTool/ExecuteCompilerInvocation.cpp:281:0
#32 0x000055e0c6d03832 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /usr/src/debug/clang/clang-19.1.7.src/tools/driver/cc1_main.cpp:284:40
#33 0x000055e0c6d0804e ExecuteCC1Tool /usr/src/debug/clang/clang-19.1.7.src/tools/driver/driver.cpp:215:20
#34 0x000055e0c6d08de3 clang_main(int, char**, llvm::ToolContext const&) /usr/src/debug/clang/clang-19.1.7.src/tools/driver/driver.cpp:256:26
#35 0x000055e0c6cfbf65 main /usr/src/debug/clang/clang-19.1.7.src/build/tools/driver/clang-driver.cpp:18:1
#36 0x00007fa38d0376b5 __libc_start_call_main /usr/src/debug/glibc/glibc/csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#37 0x00007fa38d037769 call_init /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:128:20
#38 0x00007fa38d037769 __libc_start_main /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:347:5
#39 0x000055e0c6cfbfc5 _start (/usr/bin/clang+++0xafc5)
clang++: error: unable to execute command: Segmentation fault (core dumped)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 19.1.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
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: /tmp/keyevent-89980c.cppm
clang++: note: diagnostic msg: /tmp/keyevent-89980c.sh
clang++: note: diagnostic msg: 

********************


When I use cmake:

☁  modforge mkdir build && cd build
☁  build cmake -GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_BUILD_TYPE=Debug ..
-- The C compiler identification is GNU 15.1.1
-- The CXX compiler identification is Clang 19.1.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: /home/hexne/modforge/build
☁  build cmake --build .                                                                                        
[3/4] Building CXX object CMakeFiles/modforge.dir/keyevent.cppm.o
FAILED: CMakeFiles/modforge.dir/keyevent.cppm.o CMakeFiles/modforge.dir/modforge.keyevent.pcm 
/usr/bin/clang++   -stdlib=libc++ -g -std=gnu++23 -MD -MT CMakeFiles/modforge.dir/keyevent.cppm.o -MF CMakeFiles/modforge.dir/keyevent.cppm.o.d @CMakeFiles/modforge.dir/keyevent.cppm.o.modmap -o CMakeFiles/modforge.dir/keyevent.cppm.o -c /home/hexne/modforge/keyevent.cppm
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++ -cc1 -triple x86_64-pc-linux-gnu -emit-obj -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name keyevent.cppm -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/hexne/modforge/build -fcoverage-compilation-dir=/home/hexne/modforge/build -resource-dir /usr/lib/clang/19 -std=gnu++23 -fdeprecated-macro -ferror-limit 19 -stack-protector 2 -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/modforge.dir/keyevent.cppm.o -x pcm CMakeFiles/modforge.dir/modforge.keyevent.pcm
1.      <eof> parser at end of file
2.      Code generation
 #0 0x00007ff080a19920 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/libLLVM.so.19.1+0x819920)
 #1 0x00007ff080a168bd (/usr/lib/libLLVM.so.19.1+0x8168bd)
 #2 0x00007ff07fc4def0 (/usr/lib/libc.so.6+0x3def0)
 #3 0x00007ff080c779a5 (/usr/lib/libLLVM.so.19.1+0xa779a5)
 #4 0x00007ff081750402 (/usr/lib/libLLVM.so.19.1+0x1550402)
 #5 0x00007ff081763f26 llvm::AsmPrinter::emitXXStructorList(llvm::DataLayout const&, llvm::Constant const*, bool) (/usr/lib/libLLVM.so.19.1+0x1563f26)
 #6 0x00007ff08175ab0f llvm::AsmPrinter::emitSpecialLLVMGlobal(llvm::GlobalVariable const*) (/usr/lib/libLLVM.so.19.1+0x155ab0f)
 #7 0x00007ff081763783 llvm::AsmPrinter::emitGlobalVariable(llvm::GlobalVariable const*) (/usr/lib/libLLVM.so.19.1+0x1563783)
 #8 0x00007ff08175d7b9 llvm::AsmPrinter::doFinalization(llvm::Module&) (/usr/lib/libLLVM.so.19.1+0x155d7b9)
 #9 0x00007ff080be0c2d llvm::FPPassManager::doFinalization(llvm::Module&) (/usr/lib/libLLVM.so.19.1+0x9e0c2d)
#10 0x00007ff080bed4a9 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/libLLVM.so.19.1+0x9ed4a9)
#11 0x00007ff08a139034 llvm::TimeTraceScope::~TimeTraceScope() /usr/include/llvm/Support/TimeProfiler.h:189:0
#12 0x00007ff08a139034 RunCodegenPipeline /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/BackendUtil.cpp:1158:0
#13 0x00007ff08a139034 EmitAssembly /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/BackendUtil.cpp:1180:0
#14 0x00007ff08a139034 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/BackendUtil.cpp:1341:0
#15 0x00007ff08a50163a llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>::release() /usr/include/llvm/ADT/IntrusiveRefCntPtr.h:232:9
#16 0x00007ff08a50163a llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>::~IntrusiveRefCntPtr() /usr/include/llvm/ADT/IntrusiveRefCntPtr.h:196:34
#17 0x00007ff08a50163a clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /usr/src/debug/clang/clang-19.1.7.src/lib/CodeGen/CodeGenAction.cpp:354:20
#18 0x00007ff088fd9b86 __gnu_cxx::__normal_iterator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>*, std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>>::__normal_iterator(std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>* const&) /usr/include/c++/14.2.1/bits/stl_iterator.h:1068:9
#19 0x00007ff088fd9b86 std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>::begin() /usr/include/c++/14.2.1/bits/stl_vector.h:874:16
#20 0x00007ff088fd9b86 void clang::finalize<std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>>(std::vector<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>, std::allocator<std::unique_ptr<clang::TemplateInstantiationCallback, std::default_delete<clang::TemplateInstantiationCallback>>>>&, clang::Sema const&) /usr/src/debug/clang/clang-19.1.7.src/include/clang/Sema/TemplateInstCallback.h:54:3
#21 0x00007ff088fd9b86 clang::ParseAST(clang::Sema&, bool, bool) /usr/src/debug/clang/clang-19.1.7.src/lib/Parse/ParseAST.cpp:191:11
#22 0x00007ff08ad021a1 clang::FrontendAction::Execute() /usr/src/debug/clang/clang-19.1.7.src/lib/Frontend/FrontendAction.cpp:1078:21
#23 0x00007ff08ac9808f llvm::Error::getPtr() const /usr/include/llvm/Support/Error.h:282:12
#24 0x00007ff08ac9808f llvm::Error::operator bool() /usr/include/llvm/Support/Error.h:242:22
#25 0x00007ff08ac9808f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /usr/src/debug/clang/clang-19.1.7.src/lib/Frontend/CompilerInstance.cpp:1061:42
#26 0x00007ff08ad5ce85 std::__shared_ptr<clang::FrontendOptions, (__gnu_cxx::_Lock_policy)2>::get() const /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1667:0
#27 0x00007ff08ad5ce85 std::__shared_ptr_access<clang::FrontendOptions, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get() const /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1364:0
#28 0x00007ff08ad5ce85 std::__shared_ptr_access<clang::FrontendOptions, (__gnu_cxx::_Lock_policy)2, false, false>::operator*() const /usr/include/c++/14.2.1/bits/shared_ptr_base.h:1350:0
#29 0x00007ff08ad5ce85 clang::CompilerInvocation::getFrontendOpts() /usr/src/debug/clang/clang-19.1.7.src/include/clang/Frontend/CompilerInvocation.h:259:0
#30 0x00007ff08ad5ce85 clang::CompilerInstance::getFrontendOpts() /usr/src/debug/clang/clang-19.1.7.src/include/clang/Frontend/CompilerInstance.h:312:0
#31 0x00007ff08ad5ce85 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /usr/src/debug/clang/clang-19.1.7.src/lib/FrontendTool/ExecuteCompilerInvocation.cpp:281:0
#32 0x00005651083e0832 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /usr/src/debug/clang/clang-19.1.7.src/tools/driver/cc1_main.cpp:284:40
#33 0x00005651083e504e ExecuteCC1Tool /usr/src/debug/clang/clang-19.1.7.src/tools/driver/driver.cpp:215:20
#34 0x00005651083e5de3 clang_main(int, char**, llvm::ToolContext const&) /usr/src/debug/clang/clang-19.1.7.src/tools/driver/driver.cpp:256:26
#35 0x00005651083d8f65 main /usr/src/debug/clang/clang-19.1.7.src/build/tools/driver/clang-driver.cpp:18:1
#36 0x00007ff07fc376b5 __libc_start_call_main /usr/src/debug/glibc/glibc/csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#37 0x00007ff07fc37769 call_init /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:128:20
#38 0x00007ff07fc37769 __libc_start_main /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:347:5
#39 0x00005651083d8fc5 _start (/usr/bin/clang+++0xafc5)
clang++: error: unable to execute command: Segmentation fault (core dumped)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 19.1.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
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: /tmp/keyevent-bf68be.cppm
clang++: note: diagnostic msg: /tmp/keyevent-bf68be.sh
clang++: note: diagnostic msg: 

********************
ninja: build stopped: subcommand failed.

Version:

clang:
    version 19.1.7
    Target: x86_64-pc-linux-gnu
    Thread model: posix
    InstalledDir: /usr/bin  

cmake -- 4.0.2-dirty

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:modulesC++20 modules and Clang Header ModulesllvmUmbrella label for LLVM issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions