[PATCH] D124567: [dsymutil] Fix memory issue in the BinaryHolder
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 27 15:46:33 PDT 2022
JDevlieghere created this revision.
JDevlieghere added reviewers: vsk, friss.
Herald added a project: All.
JDevlieghere requested review of this revision.
Herald added a project: LLVM.
The BinaryHolder has two caches for object and archive entries. These are implemented as StringMaps of `ObjectEntry` and `ArchiveEntry` respectively. The fact that they're stored by value is problematic because the BinaryHolder hands out references that become invalidate when the data structure grows. This patch wraps those object instances in unique pointers and changes the interface to hand out pointers. This resulted in transient failures
https://reviews.llvm.org/D124567
Files:
llvm/tools/dsymutil/BinaryHolder.cpp
llvm/tools/dsymutil/BinaryHolder.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124567.425620.patch
Type: text/x-patch
Size: 4302 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220427/8ba98157/attachment.bin>
More information about the llvm-commits
mailing list