[Bug 290381] LD segfaults when bulding Xen

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 20 Oct 2025 15:11:31 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290381

            Bug ID: 290381
           Summary: LD segfaults when bulding Xen
           Product: Base System
           Version: 14.3-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: royger@freebsd.org

Hello,

I've got the following LD segfault while building Xen on FreeBSD 14.3:

[13:36:17.855] PLEASE submit a bug report to https://bugs.freebsd.org/submit/
and include the crash backtrace.
[13:36:17.855] Stack dump:
[13:36:17.855] 0.       Program arguments: ld -melf_x86_64_fbsd -r -o prelink.o
common/built_in.o drivers/built_in.o lib/built_in.o xsm/built_in.o
arch/x86/built_in.o --start-group lib/lib.a --end-group
[13:36:21.512]  #0 0x0000000002704931 PrintStackTrace
/usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:13
[13:36:21.512]  #1 0x0000000002702895 RunSignalHandlers
/usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:106:18
[13:36:21.512]  #2 0x0000000002704f5a SignalHandler
/usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
[13:36:21.512]  #3 0x0000000825cce4a0 handle_signal
/usr/src/lib/libthr/thread/thr_sig.c:0:3
[13:36:21.512]  #4 0x0000000825ccda6b thr_sighandler
/usr/src/lib/libthr/thread/thr_sig.c:243:1
[13:36:21.512]  #5 0x00000008245af2d3 ([vdso]+0x2d3)
[13:36:21.512]  #6 0x0000000001948f43 getOutputSection
/usr/src/contrib/llvm-project/lld/ELF/InputSection.cpp:228:0
[13:36:21.512]  #7 0x000000000198bf03 finalizeShtGroup
/usr/src/contrib/llvm-project/lld/ELF/OutputSections.cpp:612:24
[13:36:21.512]  #8 0x000000000198bf03 finalize
/usr/src/contrib/llvm-project/lld/ELF/OutputSections.cpp:730:5
[13:36:21.512]  #9 0x0000000001a8aa99 finalizeSections
/usr/src/contrib/llvm-project/lld/ELF/Writer.cpp:2060:27
[13:36:21.512] #10 0x0000000001a67a4b begin
/usr/src/contrib/llvm-project/llvm/include/llvm/ADT/SmallVector.h:281:45
[13:36:21.512] #11 0x0000000001a67a4b run
/usr/src/contrib/llvm-project/lld/ELF/Writer.cpp:314:27
[13:36:21.512] #12 0x0000000001a67a4b
writeResult<llvm::object::ELFType<(llvm::endianness)1, true> >
/usr/src/contrib/llvm-project/lld/ELF/Writer.cpp:95:18
[13:36:21.512] #13 0x00000000018eee49 operator()
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/vector:529:18
[13:36:21.512] #14 0x00000000018eee49 ~vector
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/vector:541:67
[13:36:21.512] #15 0x00000000018eee49
link<llvm::object::ELFType<(llvm::endianness)1, true> >
/usr/src/contrib/llvm-project/lld/ELF/Driver.cpp:3189:1
[13:36:21.512] #16 0x00000000018ddab4 linkerMain
/usr/src/contrib/llvm-project/lld/ELF/Driver.cpp:0:5
[13:36:21.512] #17 0x00000000018dc486 link
/usr/src/contrib/llvm-project/lld/ELF/Driver.cpp:165:10
[13:36:21.512] #18 0x00000000018844f4 unsafeLldMain
/usr/src/contrib/llvm-project/lld/Common/DriverDispatcher.cpp:164:11
[13:36:21.512] #19 0x0000000001a93c78 lld_main
/usr/src/contrib/llvm-project/lld/tools/lld/lld.cpp:0:9
[13:36:21.512] #20 0x0000000001a939ad main
/usr/src/usr.bin/clang/lld/lld-driver.cpp:17:10
[13:36:21.512] #21 0x0000000829653e34 __libc_start1
/usr/src/lib/libc/csu/libc_start1.c:157:2
[13:36:23.810] Segmentation fault (core dumped)
[13:36:23.810] gmake[2]: *** [build.mk:84: prelink.o] Error 139
[13:36:23.811] gmake[1]: *** [Makefile:624: xen] Error 2
[13:36:23.811] gmake[1]: Leaving directory '/tmp/cirrus-ci-build/xen'
[13:36:23.811] gmake: *** [Makefile:55: build-xen] Error 2

Full Cirrus-CI job at:

https://cirrus-ci.com/task/4783982144913408?logs=build#L616

-- 
You are receiving this mail because:
You are the assignee for the bug.