<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/94868>94868</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
uefi-unknown-x86_64 'clang frontend command failed with exit code 139'
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
samueldr
</td>
</tr>
</table>
<pre>
Hi! :wave:
I'm not sure how I should properly report the issue, but I've been asked to *PLEASE submit a bug report*, so here.
I'm running the build using Nixpkgs, if it helps, the commit where this can be observed:
- https://github.com/samueldr/nixpkgs/commits/b1677af8e5ed26a41d337ac3fbabd8c27ea5251a
Using this command:
```
$ nix-build -A pkgsCross.x86_64-unknown-uefi.lanzaboote-uefi-stub
```
The complete build log (for compiler-rt, where the crash happens) is here:
- https://gist.github.com/samueldr/9e2052318b1601a1400a672ceaa3668b
The two files are also attached to the gist.
Do ask if I can provide anything else!
<details><summary><h3>Crash</h3></summary>
```
[1/160] Building C object lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/absvdi2.c.obj
FAILED: lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/absvdi2.c.obj
/nix/store/wxir4i0mydgx96cd47wdlfqlpjlzhxqp-x86_64-unknown-uefi-clang-wrapper-17.0.6/bin/x86_64-unknown-uefi-clang -D__func__=__FUNCTION__ -nodefaultlibs -o lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/absvdi2.c.obj -c /build/compiler-rt-src-17.0.6/compiler-rt/lib/builtins/absvdi2.c
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: /nix/store/hrx4qp667z0w23r0a263xx6mn26r444k-clang-17.0.6/bin/clang -fPIC -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong --param ssp-buffer-size=4 -O2 -U_FORTIFY_SOURCE -fwrapv -target x86_64-unknown-uefi -D__func__=__FUNCTION__ -nodefaultlibs -o lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/absvdi2.c.obj -c /build/compiler-rt-src-17.0.6/compiler-rt/lib/builtins/absvdi2.c -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -B/nix/store/595kk3yiiiwxq7j527kn5vj69mq7achr-clang-17.0.6-lib/x86_64-unknown-uefi/lib -resource-dir=/nix/store/wxir4i0mydgx96cd47wdlfqlpjlzhxqp-x86_64-unknown-uefi-clang-wrapper-17.0.6/resource-root -B/nix/store/wxir4i0mydgx96cd47wdlfqlpjlzhxqp-x86_64-unknown-uefi-clang-wrapper-17.0.6/bin/ -DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0 -Wno-error=implicit-function-declaration -frandom-seed=mpvbfs9wcw
1. <eof> parser at end of file
2. Code generation
#0 0x00007fffec60333e llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/nix/store/lashadhqph47c7ai26dkgnr8zyq31fmq-llvm-17.0.6-lib/lib/libLLVM-17.so+0xe0333e)
#1 0x00007fffec6010bc llvm::sys::CleanupOnSignal(unsigned long) (/nix/store/lashadhqph47c7ai26dkgnr8zyq31fmq-llvm-17.0.6-lib/lib/libLLVM-17.so+0xe010bc)
#2 0x00007fffec501638 CrashRecoverySignalHandler(int) (/nix/store/lashadhqph47c7ai26dkgnr8zyq31fmq-llvm-17.0.6-lib/lib/libLLVM-17.so+0xd01638)
#3 0x00007fffeb252f30 __restore_rt (/nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6+0x3ff30)
#4 0x00007fffee3fd59f (anonymous namespace)::WinCOFFWriter::GetOrCreateCOFFSymbol(llvm::MCSymbol const*) (/nix/store/lashadhqph47c7ai26dkgnr8zyq31fmq-llvm-17.0.6-lib/lib/libLLVM-17.so+0x2bfd59f)
#5 0x00007fffee3feb12 (anonymous namespace)::WinCOFFWriter::executePostLayoutBinding(llvm::MCAssembler&, llvm::MCAsmLayout const&) (/nix/store/lashadhqph47c7ai26dkgnr8zyq31fmq-llvm-17.0.6-lib/lib/libLLVM-17.so+0x2bfeb12)
#6 0x00007fffee400507 (anonymous namespace)::WinCOFFObjectWriter::executePostLayoutBinding(llvm::MCAssembler&, llvm::MCAsmLayout const&) (/nix/store/lashadhqph47c7ai26dkgnr8zyq31fmq-llvm-17.0.6-lib/lib/libLLVM-17.so+0x2c00507)
#7 0x00007fffee36da7a llvm::MCAssembler::layout(llvm::MCAsmLayout&) (/nix/store/lashadhqph47c7ai26dkgnr8zyq31fmq-llvm-17.0.6-lib/lib/libLLVM-17.so+0x2b6da7a)
#8 0x00007fffee36ddc8 llvm::MCAssembler::Finish() (/nix/store/lashadhqph47c7ai26dkgnr8zyq31fmq-llvm-17.0.6-lib/lib/libLLVM-17.so+0x2b6ddc8)
#9 0x00007fffed1843ab llvm::AsmPrinter::doFinalization(llvm::Module&) (/nix/store/lashadhqph47c7ai26dkgnr8zyq31fmq-llvm-17.0.6-lib/lib/libLLVM-17.so+0x19843ab)
#10 0x00007fffec78931c llvm::FPPassManager::doFinalization(llvm::Module&) (/nix/store/lashadhqph47c7ai26dkgnr8zyq31fmq-llvm-17.0.6-lib/lib/libLLVM-17.so+0xf8931c)
#11 0x00007fffec793cc9 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/nix/store/lashadhqph47c7ai26dkgnr8zyq31fmq-llvm-17.0.6-lib/lib/libLLVM-17.so+0xf93cc9)
#12 0x00007ffff5e0d653 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>>) (/nix/store/595kk3yiiiwxq7j527kn5vj69mq7achr-clang-17.0.6-lib/lib/libclang-cpp.so.17+0x1c0d653)
#13 0x00007ffff6256479 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/nix/store/595kk3yiiiwxq7j527kn5vj69mq7achr-clang-17.0.6-lib/lib/libclang-cpp.so.17+0x2056479)
#14 0x00007ffff4cb4779 clang::ParseAST(clang::Sema&, bool, bool) (/nix/store/595kk3yiiiwxq7j527kn5vj69mq7achr-clang-17.0.6-lib/lib/libclang-cpp.so.17+0xab4779)
#15 0x00007ffff6bc9a29 clang::FrontendAction::Execute() (/nix/store/595kk3yiiiwxq7j527kn5vj69mq7achr-clang-17.0.6-lib/lib/libclang-cpp.so.17+0x29c9a29)
#16 0x00007ffff6b4c269 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/nix/store/595kk3yiiiwxq7j527kn5vj69mq7achr-clang-17.0.6-lib/lib/libclang-cpp.so.17+0x294c269)
#17 0x00007ffff6c5392b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/nix/store/595kk3yiiiwxq7j527kn5vj69mq7achr-clang-17.0.6-lib/lib/libclang-cpp.so.17+0x2a5392b)
#18 0x000000000041662e cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/nix/store/hrx4qp667z0w23r0a263xx6mn26r444k-clang-17.0.6/bin/clang+0x41662e)
#19 0x000000000040edaa ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) (/nix/store/hrx4qp667z0w23r0a263xx6mn26r444k-clang-17.0.6/bin/clang+0x40edaa)
#20 0x00007ffff67ad349 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) (/nix/store/595kk3yiiiwxq7j527kn5vj69mq7achr-clang-17.0.6-lib/lib/libclang-cpp.so.17+0x25ad349)
#21 0x00007fffec501a53 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/nix/store/lashadhqph47c7ai26dkgnr8zyq31fmq-llvm-17.0.6-lib/lib/libLLVM-17.so+0xd01a53)
#22 0x00007ffff67ada01 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) (/nix/store/595kk3yiiiwxq7j527kn5vj69mq7achr-clang-17.0.6-lib/lib/libclang-cpp.so.17+0x25ada01)
#23 0x00007ffff6775314 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/nix/store/595kk3yiiiwxq7j527kn5vj69mq7achr-clang-17.0.6-lib/lib/libclang-cpp.so.17+0x2575314)
#24 0x00007ffff6775dfd clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/nix/store/595kk3yiiiwxq7j527kn5vj69mq7achr-clang-17.0.6-lib/lib/libclang-cpp.so.17+0x2575dfd)
#25 0x00007ffff678817c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/nix/store/595kk3yiiiwxq7j527kn5vj69mq7achr-clang-17.0.6-lib/lib/libclang-cpp.so.17+0x258817c)
#26 0x000000000041406d clang_main(int, char**, llvm::ToolContext const&) (/nix/store/hrx4qp667z0w23r0a263xx6mn26r444k-clang-17.0.6/bin/clang+0x41406d)
#27 0x000000000040e11f main (/nix/store/hrx4qp667z0w23r0a263xx6mn26r444k-clang-17.0.6/bin/clang+0x40e11f)
#28 0x00007fffeb23d10e __libc_start_call_main (/nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6+0x2a10e)
#29 0x00007fffeb23d1c9 __libc_start_main@GLIBC_2.2.5 (/nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6+0x2a1c9)
#30 0x000000000040e165 _start (/nix/store/hrx4qp667z0w23r0a263xx6mn26r444k-clang-17.0.6/bin/clang+0x40e165)
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 17.0.6
Target: x86_64-unknown-uefi
Thread model: posix
InstalledDir: /nix/store/hrx4qp667z0w23r0a263xx6mn26r444k-clang-17.0.6/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: /build/absvdi2-e38047.c
clang: note: diagnostic msg: /build/absvdi2-e38047.sh
clang: note: diagnostic msg:
********************
```
</details>
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkWttz26q3_muUF0YeCdm6POTBseM2v0l3MnW6O-dJgwDZ1BIogBw7f_0ZkC_CcdK9d9Psc-l0HFvcvm-tj8UCgZRiC07ppTe68kbTC9TqpZCXCtUtrYi8KATZXn5mHgyBF42f0Jp60Rh4wdQLxt3njQeTGnChgWolBUvxBG6AWoq2IqCRoqGy2gJJGyE10EsKmFIt9eAEFK0GpvGagoJSDpBaUQK0AB4c399ej-fXQLVFzTRAoGgXuz48ODaNlQBLKungJRLZcs74wo5VtKwioFXm9x9s06wWyjRmJWAaLGnV2J-mJha1GenJdAr0kimAEQcFBaJQVK4p8aJxfyzgg6XWjTKP4cyDswXTy7YYYFF7cLY3nwdnfD_srBvCfCvCOElQmdIRJTBGw5BEUYJwVBaoICmGCUUjOApRf8BvqiNlkIm6RvwUkRcHu_8dQA8OAWcbv7OBPwYGxkQKpQabNM7jod_yFRdP3G9pyQYV4s-oEEJT-9tXui3Odtx9PnQ2ayqq92auxAJ4MC2FtCWsotI3_pocrEoBlkgtwRI1DeXKgxlgyvrx59ZVevCaiTMKgxGMwrQI4yBE4TAIUJxATBGK4jgtTnHrJwFKVlEFkKQAVUoApDXCy05-Bqcdr99uKow-jXJurDIaKdaMUID4Vi-NZ2ilqAdDxyPRhFCNWKW86Nq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