[llvm-bugs] [Bug 30793] New: lld segfaults when using --gc-sections

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 25 15:33:20 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30793

            Bug ID: 30793
           Summary: lld segfaults when using --gc-sections
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: phosek at chromium.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

We have seen segfaults when using lld with --gc-sections, but we haven't yet
managed to come up with a minimal reproducer:

../../buildtools/toolchain/clang+llvm-x86_64-linux/bin/clang++
--sysroot=../sysroot/x86_64-fuchsia --target=x86_64-fuchsia -Wl,--gc-sections
-o "./exe.unstripped/flutter_wtf_unittests" -Wl,--start-group
@"./flutter_wtf_unittests.rsp"  -Wl,--end-group -lmxio -lmagenta &&
../../magenta/prebuilt/downloads/x86_64-elf-6.2.0-Linux-x86_64/bin/x86_64-elf-strip
-s -o "./flutter_wtf_unittests" "./exe.unstripped/flutter_wtf_unittests"
#0 0x00000000009ea032 PrintStackTraceSignalHandler(void*)
(/usr/local/google/home/vtl/projects/fuchsia/out/debug-x86-64/../../buildtools/toolchain/clang+llvm-x86_64-linux/bin/lld+0x9ea032)
#1 0x00000000009e7fc6 SignalHandler(int)
(/usr/local/google/home/vtl/projects/fuchsia/out/debug-x86-64/../../buildtools/toolchain/clang+llvm-x86_64-linux/bin/lld+0x9e7fc6)
#2 0x00007f18d2bdc330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#3 0x0000000001a57f1d llvm::object::ELFType<(llvm::support::endianness)1,
true>::uint
lld::elf::SymbolBody::getVA<llvm::object::ELFType<(llvm::support::endianness)1,
true> >(llvm::object::ELFType<(llvm::support::endianness)1, true>::uint) const
(/usr/local/google/home/vtl/projects/fuchsia/out/debug-x86-64/../../buildtools/toolchain/clang+llvm-x86_64-linux/bin/lld+0x1a57f1d)
#4 0x00000000019dfe19
lld::elf::InputSectionBase<llvm::object::ELFType<(llvm::support::endianness)1,
true> >::relocate(unsigned char*, unsigned char*)
(/usr/local/google/home/vtl/projects/fuchsia/out/debug-x86-64/../../buildtools/toolchain/clang+llvm-x86_64-linux/bin/lld+0x19dfe19)
#5 0x00000000019e29b3
lld::elf::InputSection<llvm::object::ELFType<(llvm::support::endianness)1,
true> >::writeTo(unsigned char*)
(/usr/local/google/home/vtl/projects/fuchsia/out/debug-x86-64/../../buildtools/toolchain/clang+llvm-x86_64-linux/bin/lld+0x19e29b3)
#6 0x0000000001a2734b
lld::elf::OutputSection<llvm::object::ELFType<(llvm::support::endianness)1,
true> >::writeTo(unsigned char*)
(/usr/local/google/home/vtl/projects/fuchsia/out/debug-x86-64/../../buildtools/toolchain/clang+llvm-x86_64-linux/bin/lld+0x1a2734b)
#7 0x00000000009a5fd3 (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
>::run()
(/usr/local/google/home/vtl/projects/fuchsia/out/debug-x86-64/../../buildtools/toolchain/clang+llvm-x86_64-linux/bin/lld+0x9a5fd3)
#8 0x00000000019bacb9 void
lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1,
true> >(llvm::opt::InputArgList&)
(/usr/local/google/home/vtl/projects/fuchsia/out/debug-x86-64/../../buildtools/toolchain/clang+llvm-x86_64-linux/bin/lld+0x19bacb9)
#9 0x00000000009615e5 lld::elf::LinkerDriver::main(llvm::ArrayRef<char const*>)
(/usr/local/google/home/vtl/projects/fuchsia/out/debug-x86-64/../../buildtools/toolchain/clang+llvm-x86_64-linux/bin/lld+0x9615e5)
#10 0x000000000091d855 main
(/usr/local/google/home/vtl/projects/fuchsia/out/debug-x86-64/../../buildtools/toolchain/clang+llvm-x86_64-linux/bin/lld+0x91d855)
#11 0x00007f18d1abef45 __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#12 0x000000000091d029 _start
(/usr/local/google/home/vtl/projects/fuchsia/out/debug-x86-64/../../buildtools/toolchain/clang+llvm-x86_64-linux/bin/lld+0x91d029)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161025/226f7837/attachment.html>


More information about the llvm-bugs mailing list