[llvm-bugs] [Bug 40525] New: Incorrect encoding of DWARF 5 loc list entry

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 30 05:23:05 PST 2019


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

            Bug ID: 40525
           Summary: Incorrect encoding of DWARF 5 loc list entry
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: paul_robinson at playstation.sony.com
                CC: jdevlieghere at apple.com, keith.walker at arm.com,
                    llvm-bugs at lists.llvm.org,
                    paul_robinson at playstation.sony.com

Report from Philip Craig, philipjcraig at gmail.com, quoted here:

I've been working on DWARF v5 parsing in another project, and I was
testing on LLVM's output, and I noticed a bug in the location list
entry.

See section 2.6.2 of the v5 standard:

"A counted location description operand consists of an unsigned ULEB
integer giving the length of the location description (see Section 2.6.1 on
page 39) that immediately follows."

but LLVM encodes the length as a 16 bit int here:
https://github.com/llvm-mirror/llvm/blob/c35ddbd43e57090947d74b7670d53ee1106c50f2/lib/CodeGen/AsmPrinter/DwarfDebug.cpp#L1981

This function is correct for DWARF v4, but needs updating for entries
in .debug_loclists. llvm-dwarfdump will need fixing to parse it
correctly too. I've checked that gcc emits a ULEB and gdb parses it as
a ULEB.

-- 
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/20190130/3a0d571a/attachment.html>


More information about the llvm-bugs mailing list