[llvm-bugs] [Bug 26872] New: lld/ELF/SymbolTable.cpp:144: Assertion `GV' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 7 21:43:29 PST 2016


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

            Bug ID: 26872
           Summary: lld/ELF/SymbolTable.cpp:144: Assertion `GV' failed.
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: chisophugis at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16001
  --> https://llvm.org/bugs/attachment.cgi?id=16001&action=edit
Bitcode that causes the error. Generated by clang.

It looks like the problematic thing is:

@.str = private unnamed_addr constant [4 x i8] c"Hey\00", align 1

In BitcodeFile::parse we call printName which produces the mangled name .L.str,
but later in addBitcodeFile in SymbolTable.cpp we call
`M->getNamedValue(B->getName())` and it doesn't find `.L.str`.

(the attached bitcode references an external function `foo`, but the other
bitcode file containing `foo` isn't needed to reproduce the assertion failure
so I didn't attach it)


sean:~/tmp % ~/pg/self-support/d+a/bin/ld.lld -m elf_x86_64 micro.o      
ld.lld: /home/sean/pg/self-support/self-support/lld/ELF/SymbolTable.cpp:144:
void addBitcodeFile(llvm::IRMover&, lld::elf::BitcodeFile&,
llvm::LLVMContext&): Assertion `GV' failed.
0  ld.lld          0x0000000000612a26
1  ld.lld          0x0000000000612d3b
2  ld.lld          0x0000000000611453
3  ld.lld          0x000000000061254d
4  libpthread.so.0 0x00007f5db3dec340
5  libc.so.6       0x00007f5db322dcc9 gsignal + 57
6  libc.so.6       0x00007f5db32310d8 abort + 328
7  libc.so.6       0x00007f5db3226b86
8  libc.so.6       0x00007f5db3226c32
9  ld.lld          0x00000000005655b0
10 ld.lld          0x000000000056b2c7
11 ld.lld          0x000000000056a000
12 ld.lld          0x0000000000499c6e
13 ld.lld          0x0000000000495d5f
14 ld.lld          0x00000000004940d2
15 ld.lld          0x0000000000408370
16 libc.so.6       0x00007f5db3218ec5 __libc_start_main + 245
17 ld.lld          0x00000000004077b9
Stack dump:
0.      Program arguments: /home/sean/pg/self-support/d+a/bin/ld.lld -m
elf_x86_64 micro.o 
zsh: abort (core dumped)  ~/pg/self-support/d+a/bin/ld.lld -m elf_x86_64
micro.o

-- 
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/20160308/d14ee5e0/attachment.html>


More information about the llvm-bugs mailing list