<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/55565>55565</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLD crash when linking on Mac
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ilovepi
</td>
</tr>
</table>
<pre>
Fuchsia's CI build is seeing crashes in LLD when linking for x86 Mac.
The crash first shows up here: https://luci-milo.appspot.com/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.x64-host_test_only-mac/b8813899019497873137/overview
Crash report:
```
[9568/37372] RUST host_x64/json_validator_valico host_x64/exe.unstripped/json_validator_valico
FAILED: host_x64/json_validator_valico host_x64/exe.unstripped/json_validator_valico
mkdir -p host_x64/exe.unstripped && RUST_BACKTRACE=1 ../../prebuilt/third_party/rust/mac-x64/bin/rustc --color=always --crate-name json_validator_valico ../../build/tools/json_validator/src/main.r...
error: linking with `../../../recipe_cleanup/clanglv2g9ecu/bin/clang++` failed: exit status: 254
|
= note: "../../../recipe_cleanup/clanglv2g9ecu/bin/clang++" "-m64" "-arch" "x86_64" "/opt/s/w/ir/x/t/rustcnEZTxW/symbols.o" "host_x64/exe.unstripped/json_validator_valico.json_validator_valico.85...
= note: Assertion failed: (isLive() && "this should only be called for live symbols"), function getVA, file lld/MachO/Symbols.cpp, line 77.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /opt/s/w/ir/x/w/fuchsia/out/not-default/../../../recipe_cleanup/clanglv2g9ecu/bin/ld64.lld -demangle -dynamic -arch x86_64 -platform_version macos 10.13.0 10.13.0 -s...
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 ld64.lld 0x000000010d054beb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1 ld64.lld 0x000000010d0538f8 llvm::sys::RunSignalHandlers() + 248
2 ld64.lld 0x000000010d055250 SignalHandler(int) + 272
3 libsystem_platform.dylib 0x00007fff6b8755fd _sigtramp + 29
4 ld64.lld 0x00000001115970d2 xla::RunId::RunId()::counter + 555466
5 libsystem_c.dylib 0x00007fff6b74b808 abort + 120
6 libsystem_c.dylib 0x00007fff6b74aac6 err + 0
7 ld64.lld 0x000000010d38f7e8 lld::macho::Defined::getVA() const + 104
8 ld64.lld 0x000000010d3942b7 lld::macho::NonLazyPointerSectionBase::writeTo(unsigned char*) const + 119
9 ld64.lld 0x000000010d3bdc30 (anonymous namespace)::Writer::writeOutputFile() + 368
10 ld64.lld 0x000000010d3b80cd void lld::macho::writeResult<lld::macho::LP64>() + 3917
11 ld64.lld 0x000000010d3539ee lld::macho::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) + 31982
12 ld64.lld 0x000000010cf8d61a lldMain(int, char const**, llvm::raw_ostream&, llvm::raw_ostream&, bool) + 1818
13 ld64.lld 0x000000010cf8cda7 main + 263
14 libdyld.dylib 0x00007fff6b67ccc9 start + 1
clang-15: error: unable to execute command: Abort trap: 6
clang-15: error: linker command failed due to signal (use -v to see invocation)
error: aborting due to previous error
```
Unfortunately, LLD does not output a reproducer. This is more motivation for https://reviews.llvm.org/D120201
We are working on bisecting the issue, but that will take a while.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1WFtz4jgW_jXwosLlC8b2Aw-EJDVdS2-nksx07bxQsixjTcuWS5IhzK_fc2RDuPUUO1NLOUZI8rl-59NxclXs588dq4ygozAxZPmF5J2QBRGGGM5FsyFMU1NxQ0RDVqtHsqt4Q6RofuBaqTT5SGfkK2XeyH8c-Yv-_l7x_jlSCm0sMZXaGdK1pOKaj6IFqaxtDQxG4TNcsmNiUgupPNq2plXWY6qG-U7ArYW_8mDis7OOawNDhqtM0maztkpJVlHReEzAs5p7H7PppFLGri2Hm2rkflJTh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