mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
[Orc] Fix member variable ordering issue in OrcMCJITReplacement.
https://reviews.llvm.org/D36888 From that review description: When an OrcMCJITReplacement object gets destructed, LazyEmitLayer may still contain a shared_ptr of a module, which requires ShouldDelete in the deleter. But ShouldDelete gets destructed before LazyEmitLayer due to the order of declaration in OrcMCJITReplacement, which leads to a crash, when the destructor of LazyEmitLayer is executed. Changing the order of declaration fixes this. Patch by Moritz Kroll. Thanks Moritz! llvm-svn: 312086
This commit is contained in:
parent
72b8cc251f
commit
7ccf288bc5
@ -381,6 +381,9 @@ private:
|
||||
std::shared_ptr<JITSymbolResolver> ClientResolver;
|
||||
Mangler Mang;
|
||||
|
||||
std::map<Module*, bool> ShouldDelete;
|
||||
std::vector<std::shared_ptr<Module>> LocalModules;
|
||||
|
||||
NotifyObjectLoadedT NotifyObjectLoaded;
|
||||
NotifyFinalizedT NotifyFinalized;
|
||||
|
||||
@ -402,8 +405,6 @@ private:
|
||||
std::map<ObjectLayerT::ObjHandleT, SectionAddrSet, ObjHandleCompare>
|
||||
UnfinalizedSections;
|
||||
|
||||
std::map<Module*, bool> ShouldDelete;
|
||||
std::vector<std::shared_ptr<Module>> LocalModules;
|
||||
std::vector<object::OwningBinary<object::Archive>> Archives;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user