[llvm-bugs] [Bug 46184] New: segfault with empty dynamic list

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 3 07:06:40 PDT 2020


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

            Bug ID: 46184
           Summary: segfault with empty dynamic list
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: edd-llvm at mr-edd.co.uk
                CC: llvm-bugs at lists.llvm.org, smithp352 at googlemail.com

This reproducible works as of
https://github.com/llvm/llvm-project/commit/579d6ed48cf9a893a21bfb20418b659d183a51a1

I'm configuring with:

  cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=lld
-DLLVM_TARGETS_TO_BUILD=X86 ../llvm

The segfault is then provoked with:

dev:~$ ./bin/ld.lld --dynamic-list <( echo '' )
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: ./bin/ld.lld --dynamic-list /dev/fd/63
 #0 0x00000651116be06a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(./bin/ld.lld+0x57006a)
 #1 0x00000651116bbe14 llvm::sys::RunSignalHandlers() (./bin/ld.lld+0x56de14)
 #2 0x00000651116bbf63 SignalHandler(int) (./bin/ld.lld+0x56df63)
 #3 0x00006ecca246d890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x0000065111973353 lld::elf::ScriptLexer::getCurrentMB()
(./bin/ld.lld+0x825353)
 #5 0x00000651119735a7 lld::elf::ScriptLexer::getCurrentLocation[abi:cxx11]()
(./bin/ld.lld+0x8255a7)
 #6 0x000006511197387d lld::elf::ScriptLexer::setError(llvm::Twine const&)
(.part.63) (./bin/ld.lld+0x82587d)
 #7 0x00000651119748e0 lld::elf::ScriptLexer::next() (./bin/ld.lld+0x8268e0)
 #8 0x0000065111974b88 lld::elf::ScriptLexer::expect(llvm::StringRef)
(./bin/ld.lld+0x826b88)
 #9 0x0000065111855cd3 lld::elf::readDynamicList(llvm::MemoryBufferRef)
(./bin/ld.lld+0x707cd3)
#10 0x00000651117a4221 readConfigs(llvm::opt::InputArgList&)
(./bin/ld.lld+0x656221)
#11 0x00000651115f48b3 lld::elf::LinkerDriver::main(llvm::ArrayRef<char
const*>) (./bin/ld.lld+0x4a68b3)
#12 0x00000651117af419 lld::elf::link(llvm::ArrayRef<char const*>, bool,
llvm::raw_ostream&, llvm::raw_ostream&) (./bin/ld.lld+0x661419)
#13 0x00000651115f21c0 main (./bin/ld.lld+0x4a41c0)
#14 0x00006ecca1548b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#15 0x000006511166021a _start (./bin/ld.lld+0x51221a)
Segmentation fault

-- 
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/20200603/872199a8/attachment.html>


More information about the llvm-bugs mailing list