[PATCH] D104353: [lld-macho] Avoid force-loading the same archive twice
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 18 17:26:30 PDT 2021
thakis added inline comments.
================
Comment at: lld/MachO/Driver.cpp:268
for (const ArchiveMember &member : getArchiveMembers(*buffer)) {
if (Optional<InputFile *> file = loadArchiveMember(
member.mbref, member.modTime, path, /*objCOnly=*/false)) {
----------------
thakis wrote:
> I don't know if that's what's happening, but if loadArchiveMember() loads a .o file that contains LC_LINKER_OPTIONS that has a -l flag that can recursively call addFile() again which can resize loadedArchives and invalidate the cachedFile ref.
Reverted in c9b241efd68c for now to green up bots. This sounds like a plausible theory to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104353/new/
https://reviews.llvm.org/D104353
More information about the llvm-commits
mailing list