[llvm-bugs] [Bug 36367] New: LLD crashes with --emit-relocs when trying to proccess .eh_frame
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Feb 13 07:50:18 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36367
Bug ID: 36367
Summary: LLD crashes with --emit-relocs when trying to proccess
.eh_frame
Product: lld
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: unassignedbugs at nondot.org
Reporter: grimar at accesssoftek.com
CC: llvm-bugs at lists.llvm.org
Following testcase crashes because we currently assume that .rel[a] sections
follows their targets in a sections list. That is not true for .eh_frame case,
where we have synthetic IntX::EhFrame that is created together
with another synthetic sections and it collects EhInputSection inside, so
it creates output section later than .rel[a].eh_frame are proccessed.
So 'Out' local variable is null in elf::getOutputSectionName and addInputSec
and
we segfault. Not sure what we would want to do. Looks additional sorting to
place
.rel[a].eh_frame after .eh_frame might help, but it will break current
assumption that we place synthetic sections at the end and make things more
complicated. And it is not clear if we need to support this case actually. Can
we just restrict using of .eh_frame and emit-relocs together may be to fix
crash ?
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
# RUN: ld.lld --emit-relocs %t1.o -o %t
.text
.globl foo
foo:
.cfi_startproc
.Lfunc_end0:
.size foo, .Lfunc_end0-foo
.cfi_endproc
--
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/20180213/78bba483/attachment-0001.html>
More information about the llvm-bugs
mailing list