[PATCH] D92360: [lld/mac] Fix issues around thin archives
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 18:21:26 PST 2020
thakis created this revision.
thakis added a reviewer: lld-macho.
thakis requested review of this revision.
- most importantly, fix a use-after-free when using thin archives, by putting the archive unique_ptr to the arena allocator. This ports D65565 <https://reviews.llvm.org/D65565> to MachO
- correctly demangle symbol namess from archives in diagnostics
- add a test for thin archives -- it finds this UaF, but only when running it under asan (it also finds the demangling fix)
- make forceLoadArchive() use addFile() with a bool to have the archive loading code in fewer places. no behavior change; matches COFF port a bit better
https://reviews.llvm.org/D92360
Files:
lld/MachO/Driver.cpp
lld/MachO/InputFiles.cpp
lld/MachO/Symbols.cpp
lld/MachO/Symbols.h
lld/test/MachO/Inputs/mangled-symbols.s
lld/test/MachO/thin-archive.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92360.308511.patch
Type: text/x-patch
Size: 8064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201201/3c35637e/attachment-0001.bin>
More information about the llvm-commits
mailing list