[llvm-bugs] [Bug 35212] New: ThinLTO-generated IR yields dwarfdump error

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Nov 5 21:40:28 PST 2017


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

            Bug ID: 35212
           Summary: ThinLTO-generated IR yields dwarfdump error
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: alex at crichton.co
                CC: llvm-bugs at lists.llvm.org

Created attachment 19373
  --> https://bugs.llvm.org/attachment.cgi?id=19373&action=edit
minimized IR

This is a minimization of an upstream issue at
https://github.com/rust-lang/rust/issues/45511 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)

-- 
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/20171106/384e0e96/attachment.html>


More information about the llvm-bugs mailing list