[llvm-bugs] [Bug 27878] New: lld segfault on relocatable link of test/ELF/Inputs/no-augmentation.o
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 25 08:35:23 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27878
Bug ID: 27878
Summary: lld segfault on relocatable link of
test/ELF/Inputs/no-augmentation.o
Product: lld
Version: unspecified
Hardware: PC
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: emaste at freebsd.org
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Discovered while creating the test added in r270706.
% build-nodebug/bin/lldb build-debug/bin/ld.lld -- -r
tools/lld/test/ELF/Inputs/no-augmentation.o
(lldb) target create "build-debug/bin/ld.lld"
Current executable set to 'build-debug/bin/ld.lld' (x86_64).
(lldb) settings set -- target.run-args "-r"
"tools/lld/test/ELF/Inputs/no-augmentation.o"
(lldb) run
Process 60069 launching
Process 60069 launched: '/tank/emaste/src/llvm/build-debug/bin/ld.lld' (x86_64)
Process 60069 stopped
* thread #1: tid = 101148, 0x0000000000650bb2
ld.lld`lld::elf::SymbolTableSection<llvm::object::ELFType<(llvm::support::endianness)0,
true> >::writeLocalSymbols(this=0x0000000806858160, Buf=<no value available>) +
1090 at OutputSections.cpp:1332, stop reason = signal SIGSEGV: invalid address
(fault address: 0x8)
frame #0: 0x0000000000650bb2
ld.lld`lld::elf::SymbolTableSection<llvm::object::ELFType<(llvm::support::endianness)0,
true> >::writeLocalSymbols(this=0x0000000806858160, Buf=<no value available>) +
1090 at OutputSections.cpp:1332
1329 ESym->st_value = Body.Value;
1330 } else {
1331 const OutputSectionBase<ELFT> *OutSec = Section->OutSec;
-> 1332 ESym->st_shndx = OutSec->SectionIndex;
1333 ESym->st_value = OutSec->getVA() + Section->getOffset(Body);
1334 }
1335 ESym->st_name = P.second;
(lldb) bt
* thread #1: tid = 101148, 0x0000000000650bb2
ld.lld`lld::elf::SymbolTableSection<llvm::object::ELFType<(llvm::support::endianness)0,
true> >::writeLocalSymbols(this=0x0000000806858160, Buf=<no value available>) +
1090 at OutputSections.cpp:1332, stop reason = signal SIGSEGV: invalid address
(fault address: 0x8)
* frame #0: 0x0000000000650bb2
ld.lld`lld::elf::SymbolTableSection<llvm::object::ELFType<(llvm::support::endianness)0,
true> >::writeLocalSymbols(this=0x0000000806858160, Buf=<no value available>) +
1090 at OutputSections.cpp:1332
frame #1: 0x0000000000650750
ld.lld`lld::elf::SymbolTableSection<llvm::object::ELFType<(llvm::support::endianness)0,
true> >::writeTo(this=0x0000000806858160, Buf="") + 96 at
OutputSections.cpp:1310
frame #2: 0x0000000000778a51 ld.lld`(anonymous
namespace)::Writer<llvm::object::ELFType<(this=0x00007fffffffbfa0)0, true>
>::writeSections() + 673 at Writer.cpp:1352
frame #3: 0x00000000007725ee ld.lld`(anonymous
namespace)::Writer<llvm::object::ELFType<(this=0x00007fffffffbfa0)0, true>
>::run() + 318 at Writer.cpp:233
frame #4: 0x00000000007cd618 ld.lld`void
lld::elf::writeResult<llvm::object::ELFType<(llvm::support::endianness)0, true>
>(Symtab=0x00007fffffffd680)0, true> >*) + 7208 at Writer.cpp:201
frame #5: 0x00000000005538b7 ld.lld`void
lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)0,
true> >(this=0x00007fffffffe168, Args=0x00007fffffffdc90) + 3175 at
Driver.cpp:521
frame #6: 0x00000000005451ad
ld.lld`lld::elf::LinkerDriver::main(this=0x00007fffffffe168,
ArgsArr=ArrayRef<const char *> @ 0x00007fffffffdec8) + 1709 at Driver.cpp:281
frame #7: 0x0000000000544a96 ld.lld`lld::elf::link(Args=ArrayRef<const char
*> @ 0x00007fffffffe3c0, Error=0x00000000048929e8) + 182 at Driver.cpp:49
frame #8: 0x0000000000452077 ld.lld`main(Argc=3, Argv=0x00007fffffffe500) +
231 at lld.cpp:106
frame #9: 0x0000000000451eaf ld.lld`_start(ap=<unavailable>,
cleanup=<unavailable>) + 367 at crt1.c:78 [opt]
(lldb)
--
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/20160525/0598b614/attachment-0001.html>
More information about the llvm-bugs
mailing list