[llvm-bugs] [Bug 37021] New: valgrind missing debug info on LLD linked binaries

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 5 14:07:32 PDT 2018


            Bug ID: 37021
           Summary: valgrind missing debug info on LLD linked binaries
           Product: lld
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: superjoe30 at gmail.com
                CC: llvm-bugs at lists.llvm.org

When linking a clang-produced .o file with LLD, valgrind does not see the debug
info. However when linking the same .o file with binutils ld, valgrind does see
the debug info.

Upstream issue: https://github.com/zig-lang/zig/issues/896

Steps to reproduce:

// test.c
static int *foo(void) {
    return (int *)10000000;

int main(void) {
    int *x = foo();
    *x += 1;

// looks good with binutils ld
clang -o test test.c -g
valgrind ./test
==23250==    at 0x400597: main (test.c:7)

// with lld, valgrind does not see debug info
clang -o test test.c -g -fuse-ld=lld
valgrind ./test
==24210==    at 0x2010F7: ??? (in /home/andy/tmp/test)

https://bugs.llvm.org/show_bug.cgi?id=35032 seems like a duplicate, but it is
marked fixed, and this seems to still be an issue in trunk.

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/20180405/0d49850d/attachment.html>

More information about the llvm-bugs mailing list