[llvm] r257534 - [Utils] Insert DW_OP_bit_piece when only describing part of the variable

Keno Fischer via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 17 07:03:50 PST 2016


Can you check whether this was fixed by r257977 and r257979? I've already
requested they be merged to the 3.8 branch.

On Sun, Jan 17, 2016 at 4:02 PM, Joerg Sonnenberger <joerg at britannica.bec.de
> wrote:

> On Tue, Jan 12, 2016 at 10:46:09PM -0000, Keno Fischer via llvm-commits
> wrote:
> > Author: kfischer
> > Date: Tue Jan 12 16:46:09 2016
> > New Revision: 257534
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=257534&view=rev
> > Log:
> > [Utils] Insert DW_OP_bit_piece when only describing part of the variable
> >
> > Summary: The dbg.declare -> dbg.value conversion looks through any
> zext/sext
> > to find a value to describe the variable (in the expectation that those
> > zext/sext instruction will go away later). However, those values do not
> > cover the entire variable and thus need a DW_OP_bit_piece.
>
> This gives an assertion on the following test when compiling with -O2 -g:
>
>     struct stat {
>       int st_gid
>     };
>     typedef struct {
>       char *path;
>       struct stat attr
>     } ctlfs_entry_t;
>     mkstatnod(short p1) {
>       ctlfs_entry_t c;
>       memset(&c, 0, sizeof(ctlfs_entry_t));
>       c.attr.st_gid = p1;
>     }
>
> --> llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1561: void
> llvm::DebugLocEntry::finalize(const llvm::AsmPrinter &,
> DebugLocStream::ListBuilder &, const llvm::DIBasicType *): Assertion
> `Offset <= PieceOffset && "overlapping or duplicate pieces"' failed.
>
> This is a regression for clang 3.8.
>
> Joerg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160117/32c5f9e9/attachment.html>


More information about the llvm-commits mailing list