<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/133523>133523</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Ubuntu LLD 21.0.0 crash
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lld
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bemerguy
</td>
</tr>
</table>
<pre>
0. Program arguments: /usr/lib/llvm-21/bin/ld.lld -mllvm -mcpu=cortex-a77 -EL -maarch64elf -z norelro -O2 --lto-O3 --strip-debug -mllvm -polly -mllvm -polly-run-dce -mllvm -polly-run-inliner -mllvm -polly-isl-arg=--no-schedule-serialize-sccs -mllvm -polly-ast-use-context -mllvm -polly-detect-keep-going -mllvm -polly-vectorizer=stripmine -mllvm -polly-invariant-load-hoisting -mllvm -inlinecold-threshold=3 -mllvm -import-instr-limit=1500 -mllvm -inline-threshold=50 -mllvm -inlinehint-threshold=270 -mllvm -inline-instr-cost=6 -mllvm -inline-cold-callsite-threshold=3 -mllvm -locally-hot-callsite-threshold=300 -mllvm -inline-enable-cost-benefit-analysis=true -mllvm -hot-cold-split=true -mllvm -enable-merge-functions=true -mllvm -enable-loopinterchange=true -mllvm -enable-unroll-and-jam=true -mllvm -enable-loop-flatten=true -mllvm --enable-loop-distribute=true -r -o vmlinux.o -T .tmp_lto.lds --whole-archive built-in.a --start-group arch/arm64/lib/lib.a lib/lib.a --end-group
1. Running pass "function<eager-inv>(loop-mssa(licm<allowspeculation>),gvn<>,memcpyopt,dse,move-auto-init,mldst-motion<no-split-footer-bb>,polly::CodePreparationPass,polly::FunctionToScopPassAdaptor<llvm::PassManager<Scop, ScopAnalysisManager, ScopStandardAnalysisResults &, SPMUpdater &>>,sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,jump-threading,correlated-propagation,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-verify-fixpoint>,aggressive-instcombine,libcalls-shrinkwrap,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,reassociate,constraint-elimination,loop-mssa(loop-instsimplify,loop-simplifycfg,licm<no-allowspeculation>,loop-rotate<header-duplication;no-prepare-for-lto>,licm<allowspeculation>,simple-loop-unswitch<nontrivial;trivial>,loop-flatten),simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-verify-fixpoint>,loop(loop-idiom,indvars,extra-simple-loop-unswitch-passes,loop-deletion,loop-interchange,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-verify-fixpoint>,jump-threading,correlated-propagation,adce,memcpyopt,dse,move-auto-init,loop-mssa(licm<allowspeculation>),coro-elide,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-verify-fixpoint>,loop(loop-flatten,indvars,loop-deletion,loop-unroll-full),loop-distribute,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop(loop-unroll-and-jam),loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,instcombine<max-iterations=1;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,sccp,instcombine<max-iterations=1;no-verify-fixpoint>,bdce,slp-vectorizer,vector-combine,infer-alignment,instcombine<max-iterations=1;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,jump-threading)" on module "ld-temp.o"
2. Running pass "adce" on function "sde_kms_prepare_commit"
#0 0x00007d7e0de4236f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x104236f)
#1 0x00007d7e0de40079 llvm::sys::RunSignalHandlers() (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x1040079)
#2 0x00007d7e0de42a8d (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x1042a8d)
#3 0x00007d7e0c645330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
#4 0x00007d7e0ee1ee0b (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x201ee0b)
#5 0x00007d7e0ee1d46a llvm::ADCEPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x201d46a)
#6 0x00007d7e115733f6 (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x47733f6)
#7 0x00007d7e0dfe2e45 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x11e2e45)
#8 0x00007d7e1029e396 (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x349e396)
#9 0x00007d7e0dfe70c6 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x11e70c6)
#10 0x00007d7e1029eb96 (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x349eb96)
#11 0x00007d7e0dfe1a55 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x11e1a55)
#12 0x00007d7e0f6d5d53 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x28d5d53)
#13 0x00007d7e0f6d6554 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/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x28d6554)
#14 0x00007d7e0f6c5b39 llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x28c5b39)
#15 0x00007d7e0f6c4fb6 llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::FileCache) (/usr/lib/llvm-21/bin/../lib/libLLVM.so.21.0+0x28c4fb6)
#16 0x0000632b6e366e11 lld::elf::BitcodeCompiler::compile() (/usr/lib/llvm-21/bin/ld.lld+0x249e11)
#17 0x0000632b6e2f39a0 void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) (/usr/lib/llvm-21/bin/ld.lld+0x1d69a0)
#18 0x0000632b6e2da099 void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) (/usr/lib/llvm-21/bin/ld.lld+0x1bd099)
#19 0x0000632b6e2c4684 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/usr/lib/llvm-21/bin/ld.lld+0x1a7684)
#20 0x0000632b6e2c11c9 lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/usr/lib/llvm-21/bin/ld.lld+0x1a41c9)
#21 0x0000632b6e1ed9f3 lld::unsafeLldMain(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, llvm::ArrayRef<lld::DriverDef>, bool) (/usr/lib/llvm-21/bin/ld.lld+0xd09f3)
#22 0x0000632b6e1ecc84 lld_main(int, char**, llvm::ToolContext const&) (/usr/lib/llvm-21/bin/ld.lld+0xcfc84)
#23 0x0000632b6e1ed2d3 main (/usr/lib/llvm-21/bin/ld.lld+0xd02d3)
#24 0x00007d7e0c62a1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#25 0x00007d7e0c62a28b call_init ./csu/../csu/libc-start.c:128:20
#26 0x00007d7e0c62a28b __libc_start_main ./csu/../csu/libc-start.c:347:5
#27 0x0000632b6e1ec8b5 _start (/usr/lib/llvm-21/bin/ld.lld+0xcf8b5)
../scripts/link-vmlinux.sh: line 101: 129364 Segmentation fault (core dumped) ${LDFINAL} ${KBUILD_LDFLAGS} -r -o ${1} $(lto_lds) ${objects}
I think I'm "tunning" too much? lol
/usr/lib/llvm-21/bin/ld.lld -mllvm -mcpu=cortex-a77 -EL -maarch64elf -z norelro -O2 --lto-O3 --strip-debug -mllvm -polly -mllvm -polly-run-dce -mllvm -polly-run-inliner -mllvm -polly-isl-arg=--no-schedule-serialize-sccs -mllvm -polly-ast-use-context -mllvm -polly-detect-keep-going -mllvm -polly-vectorizer=stripmine -mllvm -polly-invariant-load-hoisting -mllvm -inlinecold-threshold=3 -mllvm -import-instr-limit=1500 -mllvm -inline-threshold=50 -mllvm -inlinehint-threshold=270 -mllvm -inline-instr-cost=6 -mllvm -inline-cold-callsite-threshold=3 -mllvm -locally-hot-callsite-threshold=300 -mllvm -inline-enable-cost-benefit-analysis=true -mllvm -hot-cold-split=true -mllvm -enable-merge-functions=true -mllvm -enable-loopinterchange=true -mllvm -enable-unroll-and-jam=true -mllvm -enable-loop-flatten=true -mllvm --enable-loop-distribute=true -r -o vmlinux.o -T .tmp_lto.lds --whole-archive built-in.a --start-group arch/arm64/lib/lib.a lib/lib.a --end-group
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsWltv27i2_jXMi0BDIn19yINjJ-cUJz0tmsx-NShyyeaEIrVJyknm12-QkiNZcVunzWDPDFoMpjK5uC7funCRJXNObjXAJZpcocn6gtV-Z-xlDiXYbf18kRvxfJmOks_WbC0rE2a3dQnaO0SXCSI3tbOI3CiZh_-rfYlJhshNLnX4LUZKiQSXYSLBJa9qRNfcWA9PmM1mCb6-TXDJmOW76RhUkeA_Em0sKGsS_IkkGCtv8CeaYOy8lRUWkNfbF4aVUer5-Be2tcaCw4lRqZXUYAcz0inM7BbRNcbaYMd3IGoF2IGVTMk_ADvO3WARcx7XDjA32sOTH8wK8MA9fgCo8NZIPVAY74F7Y-UfYBFdR7tKqYcaS71nVjLtsTJM4J2RzvdZNdZwowT2OwtuZ5RAdE07grIy1mOpnbdYyVJ6RNfZJE0HLI6WT4azO6n9EQWZvWLQiODGBQnT4WxUkTOlnPTwFV2VCQTPeGf8V0hfqw2a5QqiWJyDhkJ6zDRTz046RNfe1h2kkW_Qw1Uq4nA023IKAQ-4qDX30uhXPFoqZUwltQfLd0xv4StUtbZGKcy0wL-z8huscKGY96CHJEc0QoYoyWvfibMJNsm-VFLXTyOT4Ptk5Mtqo7wZKeESjB93RgEOmSX3kOS1VCEWRiymErMeb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