[PATCH] D56521: Avoid use-after-free in ~LegacyRTDyldObjectLinkingLayer
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 10 12:21:16 PST 2019
Thanks Sanjoy!
-- Lang.
On Thu, Jan 10, 2019 at 12:16 PM Sanjoy Das via Phabricator <
reviews at reviews.llvm.org> wrote:
> This revision was automatically updated to reflect the committed changes.
> Closed by commit rL350886: Avoid use-after-free in
> ~LegacyRTDyldObjectLinkingLayer (authored by sanjoy, committed by ).
>
> Repository:
> rL LLVM
>
> CHANGES SINCE LAST ACTION
> https://reviews.llvm.org/D56521/new/
>
> https://reviews.llvm.org/D56521
>
> Files:
> llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
>
>
> Index:
> llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
> ===================================================================
> --- llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
> +++ llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
> @@ -443,11 +443,14 @@
> 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;
> };
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190110/d60b30b6/attachment.html>
More information about the llvm-commits
mailing list