[llvm-bugs] [Bug 38183] New: Crash when trying to find the source file/line for an undefined symbol, due to PendingComdat
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jul 16 13:16:55 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38183
Bug ID: 38183
Summary: Crash when trying to find the source file/line for an
undefined symbol, due to PendingComdat
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: COFF
Assignee: unassignedbugs at nondot.org
Reporter: martin at martin.st
CC: llvm-bugs at lists.llvm.org
Created attachment 20560
--> https://bugs.llvm.org/attachment.cgi?id=20560&action=edit
Repro test case
The attached repro case crashes with a backtrace like this:
Stack dump:
0. Program arguments: lld-link @response.txt
#0 0x00007f3ddff0345d llvm::sys::PrintStackTrace(llvm::raw_ostream&)
lib/Support/Unix/Signals.inc:490:0
#1 0x00007f3ddff034f0 PrintStackTraceSignalHandler(void*)
lib/Support/Unix/Signals.inc:554:0
#2 0x00007f3ddff0124c llvm::sys::RunSignalHandlers()
lib/Support/Signals.cpp:67:0
#3 0x00007f3ddff02e57 SignalHandler(int) lib/Support/Unix/Signals.inc:353:0
#4 0x00007f3ddeb4b4b0 (/lib/x86_64-linux-gnu/libc.so.6+0x354b0)
#5 0x00007f3ddfa76ada lld::coff::DefinedRegular::getChunk() const
tools/lld/COFF/Symbols.h:169:0
#6 0x00007f3ddfb29810 lld::coff::getSymbolName(lld::coff::SectionChunk*,
unsigned int) tools/lld/COFF/SymbolTable.cpp:77:0
#7 0x00007f3ddfb29a8a lld::coff::getSymbolLocations(lld::coff::ObjFile*,
unsigned int) tools/lld/COFF/SymbolTable.cpp:105:0
#8 0x00007f3ddfb2a6fd lld::coff::SymbolTable::reportRemainingUndefines()
tools/lld/COFF/SymbolTable.cpp:199:0
#9 0x00007f3ddfaa1295 lld::coff::LinkerDriver::link(llvm::ArrayRef<char
const*>) tools/lld/COFF/Driver.cpp:1474:0
#10 0x00007f3ddfa9359c lld::coff::link(llvm::ArrayRef<char const*>, bool,
llvm::raw_ostream&)
tools/lld/COFF/Driver.cpp:75:0
#11 0x000000000040465a main tools/lld/tools/lld/lld.cpp:134:0
#12 0x00007f3ddeb36830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#13 0x00000000004029d9 _start (lld-link+0x4029d9)
In these cases, the DefinedRegular touched is referring to a SectionChunk that
actually is a PendingComdat which is a dummy SectionChunk.
I'm not quite familiar enough with the handling of PendingComdat to quickly see
how to best fix this.
--
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/20180716/1d8c7d51/attachment.html>
More information about the llvm-bugs
mailing list