<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/72026>72026</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Error when building Linux with latest LLVM (and CLang)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
SuperCraftAlex
</td>
</tr>
</table>
<pre>
When trying to build linux with LLVM (commit 05738a38820ffbe5b95e747db0e19b1104fc29f8), I get this error:
```
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: ld.lld -m elf_x86_64 -mllvm -import-instr-limit=5 -z noexecstack -r -o vmlinux.o -T .tmp_initcalls.lds --whole-archive vmlinux.a --no-whole-archive --start-group --end-group
1. Running pass 'Function Pass Manager' on module 'ld-temp.o'.
2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@ip6_rcv_core'
#0 0x000055698fdff53e llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/bin/lld+0x382253e)
#1 0x000055698fdfc9db SignalHandler(int) Signals.cpp:0:0
#2 0x00007faca405c710 (/usr/lib/libc.so.6+0x3e710)
#3 0x00007faca40bb575 __libc_realloc (/usr/lib/libc.so.6+0x9d575)
#4 0x000055698fd69dc4 llvm::SmallVectorBase<unsigned int>::grow_pod(void*, unsigned long, unsigned long) (/usr/local/bin/lld+0x378cdc4)
#5 0x00005569925c73b4 llvm::SUnit::addPred(llvm::SDep const&, bool) (/usr/local/bin/lld+0x5fea3b4)
#6 0x0000556991fb830a llvm::ScheduleDAGSDNodes::AddSchedEdges() (/usr/local/bin/lld+0x59db30a)
#7 0x0000556991fb09d2 (anonymous namespace)::ScheduleDAGRRList::Schedule() ScheduleDAGRRList.cpp:0:0
#8 0x0000556991f9bf2e llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/usr/local/bin/lld+0x59bef2e)
#9 0x0000556991f9e86f llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/local/bin/lld+0x59c186f)
#10 0x0000556991fa0e0a llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.0) SelectionDAGISel.cpp:0:0
#11 0x0000556991ac6d40 (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) X86ISelDAGToDAG.cpp:0:0
#12 0x00005569923b93c8 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#13 0x0000556993dfc271 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/local/bin/lld+0x781f271)
#14 0x0000556993dfc5bc llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/local/bin/lld+0x781f5bc)
#15 0x0000556993dfcfbe llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/local/bin/lld+0x781ffbe)
#16 0x000055699211bcac codegen(llvm::lto::Config const&, llvm::TargetMachine*, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex const&) LTOBackend.cpp:0:0
#17 0x000055699211c3df llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/usr/local/bin/lld+0x5b3f3df)
#18 0x000055699210edf2 llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) (/usr/local/bin/lld+0x5b31df2)
#19 0x000055699210f35b llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, std::function<llvm::Expected<std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>> (unsigned int, llvm::StringRef, llvm::Twine const&)>) (/usr/local/bin/lld+0x5b3235b)
#20 0x000055699002d915 lld::elf::BitcodeCompiler::compile() (/usr/local/bin/lld+0x3a50915)
#21 0x000055698ff4e6ff void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) (/usr/local/bin/lld+0x39716ff)
#22 0x000055698ff5bed1 lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) (/usr/local/bin/lld+0x397eed1)
#23 0x000055698ff5dfaf lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/usr/local/bin/lld+0x3980faf)
#24 0x000055698ff5f77b lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/usr/local/bin/lld+0x398277b)
#25 0x000055698fe011cc lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (/usr/local/bin/lld+0x38241cc)
#26 0x000055698fd408b6 lld_main(int, char**, llvm::ToolContext const&) (/usr/local/bin/lld+0x37638b6)
#27 0x000055698fd40b1f main (/usr/local/bin/lld+0x3763b1f)
#28 0x00007faca4045cd0 (/usr/lib/libc.so.6+0x27cd0)
#29 0x00007faca4045d8a __libc_start_main (/usr/lib/libc.so.6+0x27d8a)
#30 0x000055698fd400a5 _start (/usr/local/bin/lld+0x37630a5)
```
I think I should probably not use the latest LLVM but the CI for that commit said that all tests were completed successfully.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsmUtz4yr2wD-NsqHsQmC9Flk4dpJ_qtL_m2pn7vTOxUsyEwQaQHnMp59Csh3jeDpOz111TVe6W0Fw-J0H5yAgzslGC3GZZFdJtrwgvd8Ye7nqO2EXltR-rsTrBTX87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