Closed
Description
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.