1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Avoid use-after-free in ~LegacyRTDyldObjectLinkingLayer

Reviewers: lhames

Subscribers: mcrosier, jlebar, bixia, llvm-commits

Differential Revision: https://reviews.llvm.org/D56521

llvm-svn: 350886
This commit is contained in:
Sanjoy Das 2019-01-10 20:12:09 +00:00
parent 6ec1969254
commit 834bb55870

View File

@ -443,11 +443,14 @@ public:
private:
ExecutionSession &ES;
std::map<VModuleKey, std::unique_ptr<LinkedObject>> LinkedObjects;
ResourcesGetter GetResources;
NotifyLoadedFtor NotifyLoaded;
NotifyFinalizedFtor NotifyFinalized;
NotifyFreedFtor NotifyFreed;
// NB! `LinkedObjects` needs to be destroyed before `NotifyFreed` because
// `~ConcreteLinkedObject` calls `NotifyFreed`
std::map<VModuleKey, std::unique_ptr<LinkedObject>> LinkedObjects;
bool ProcessAllSections = false;
};