<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 - ThinLTO-generated IR yields dwarfdump error"
href="https://bugs.llvm.org/show_bug.cgi?id=35212">35212</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ThinLTO-generated IR yields dwarfdump error
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>DebugInfo
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alex@crichton.co
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=19373" name="attach_19373" title="minimized IR">attachment 19373</a> <a href="attachment.cgi?id=19373&action=edit" title="minimized IR">[details]</a></span>
minimized IR
This is a minimization of an upstream issue at
<a href="https://github.com/rust-lang/rust/issues/45511">https://github.com/rust-lang/rust/issues/45511</a> where the Rust compiler, when
using ThinLTO, generates DWARF information that the `dwarfdump` program
interprets as invalid.
I managed to minimize to the attached IR. The IR attached has been reduced via
machines (creduce on Rust source code, bugpoint on LLVM IR) and also by hand.
As a result this isn't really a direct translation of anything in Rust but
rather an "artisinal" reduction which may or may not have invalidated the
reduction itself along the way.
I unfortunately know very little about DWARF much less dwarfdump. I'm operating
under the assumption that anything accepted by LLVM *shouldn't* generate an
error with dwarfdump, but that may also be totally wrong! If so, please just
let me know!
In any case, I can reproduce the error via:
$ llc -filetype=obj -O0 foo.ll -o foo.o
$ dwarfdump -i foo.o > /dev/null
dwarfdump ERROR: reference form with no valid local ref?!,
offset=<0x00000078>: DW_DLE_ATTR_FORM_OFFSET_BAD (119)</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>