[PATCH] D104605: [LLD] [COFF] Fix handling of LTO comdats with nontrivial selection types after 728cc0075e5dfdb454eb

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 21 12:53:42 PDT 2021


mstorsjo added inline comments.


================
Comment at: lld/COFF/InputFiles.cpp:569
+        const coff_aux_section_definition *leaderDef = nullptr;
+        if (leaderChunk->file)
+          leaderDef = findSectionDef(leaderChunk->file->getCOFFObj(),
----------------
Also just for reference, this particular bit of the patch fixes the crash that @jeremyd2019 mentioned. (The testcase doesn't exactly test this situation though, but I'm including the fix as fairly trivial.) This particular change alone would degrade the crash into an error about duplicate symbols (due to comdat mismatches), while the rest of the patch makes the situation not an error, like before.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104605/new/

https://reviews.llvm.org/D104605



More information about the llvm-commits mailing list