<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - LLD crashes with --emit-relocs when trying to proccess .eh_frame"
href="https://bugs.llvm.org/show_bug.cgi?id=36367">36367</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LLD crashes with --emit-relocs when trying to proccess .eh_frame
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>ELF
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>grimar@accesssoftek.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>