[PATCH] D36078: [XRay][compiler-rt] Remove use of std::mutex and std::shared_ptr from global scope.

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 07:51:54 PDT 2017


> On 2 Aug 2017, at 00:49, David Blaikie <dblaikie at gmail.com> wrote:
> 
> 
> 
> On Mon, Jul 31, 2017 at 11:18 PM Dean Michael Berris via Phabricator <reviews at reviews.llvm.org <mailto:reviews at reviews.llvm.org>> wrote:
> dberris added a comment.
> 
> In https://reviews.llvm.org/D36078#826962 <https://reviews.llvm.org/D36078#826962>, @kpw wrote:
> 
> > What's the primary motivation? Are we trying to avoid the upfront cost of global initialization? The unspecified destructor ordering with multithreaded programs?
> 
> 
> The primary motivation is to avoid the initialization of atomics at initialization time. This has caused some issues in the past with dynamic linking and relocations.
> 
> Correctness issues? Performance issues? Seems like it'd be good to have the issues described more fully here (and/or in the commit(s) for posterity/clarity)
>  

Runtime crashes during initialisation and incompatibilities. I guess you can call those correctness issues.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170802/a684f966/attachment.html>


More information about the llvm-commits mailing list