From cd255c5cf2441442b46200d298c0cbccf83caba5 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 21 Oct 2023 15:28:43 +0200 Subject: Vendor import of llvm-project branch release/17.x llvmorg-17.0.3-0-g888437e1b600. --- lld/COFF/InputFiles.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lld/COFF/InputFiles.cpp') diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp index 541837a7fcec..a7a08fb2fa6e 100644 --- a/lld/COFF/InputFiles.cpp +++ b/lld/COFF/InputFiles.cpp @@ -661,6 +661,8 @@ std::optional ObjFile::createDefined( if (prevailing) { SectionChunk *c = readSection(sectionNumber, def, getName()); sparseChunks[sectionNumber] = c; + if (!c) + return nullptr; c->sym = cast(leader); c->selection = selection; cast(leader)->data = &c->repl; -- cgit v1.3