[PATCH] D68352: [lld] Handle sections without chunks during PDB generation
Stefan Schmidt via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 11:55:06 PDT 2019
thrimbor created this revision.
Herald added subscribers: llvm-commits, aprantl.
Herald added a project: LLVM.
Fixes crash when linking with DWARF debug info introduced by 09cca5b243d0fe1302f73ff158a02dcd1d316f2e <https://reviews.llvm.org/rG09cca5b243d0fe1302f73ff158a02dcd1d316f2e>
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D68352
Files:
lld/COFF/PDB.cpp
Index: lld/COFF/PDB.cpp
===================================================================
--- lld/COFF/PDB.cpp
+++ lld/COFF/PDB.cpp
@@ -1465,8 +1465,10 @@
pdb::DbiModuleDescriptorBuilder &mod,
OutputSection &os,
BumpPtrAllocator &allocator) {
- // If there's a section, there's at least one chunk
- assert(!sec->chunks.empty());
+ // Skip empty sections
+ if (!sec || sec->chunks.empty())
+ return;
+
const Chunk *firstChunk = *sec->chunks.begin();
const Chunk *lastChunk = *sec->chunks.rbegin();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68352.222886.patch
Type: text/x-patch
Size: 628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191002/8c094eda/attachment.bin>
More information about the llvm-commits
mailing list