[lldb-dev] [PATCH] Minor lldb_private::ModuleList fixes

Greg Clayton gclayton at apple.com
Mon Mar 24 09:58:32 PDT 2014

Note that std::once can be used to enforce "run once" and we don't have to worry about each platform (like we would have to if we used pthread_once).

Modified version submitted with:

Author: gclayton
Date: Mon Mar 24 11:50:33 2014
New Revision: 204622

URL: http://llvm.org/viewvc/llvm-project?rev=204622&view=rev
Modified patch from Piotr Rak that makes GetSharedModuleList() more thread safe and also fixed a missed member initialization on the copy contractor and also makes the assignment operator safer.


On Mar 23, 2014, at 2:28 PM, Piotr Rak <piotr.rak at gmail.com> wrote:

> Hi,
> Not 100% sure about initialization (last hunk GetSharedModuleList()), but as I see it, it was racy, unless it is always protected by something in Target.
> Other two are minor things, with ModuleList::operator= priority inversion probably never occurring in current code as is. However it might fight back in future, and since I've noticed it...
> Please commit if OK for trunk.
> Cheers,
> /Piotr
> <Minor-lldb_private-ModuleList-fixes.diff><0001-Minor-lldb_private-ModuleList-fixes.patch>_______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

More information about the lldb-dev mailing list