[PATCH] correct llvm::sys::Memory thread-safety

Reid Kleckner rnk at google.com
Mon Oct 14 09:49:08 PDT 2013


This seems like way overkill for something that doesn't have a real
finalizer.  All threads will observe the same page size, right?  Why not
query the size and do an atomic store if the size is uninitialized?  You'd
probably need to consult a shared memory expert to get this 100% correct.


On Mon, Oct 14, 2013 at 9:01 AM, Jim Kearney <jim.kearney at oracle.com> wrote:

> Please review the attached patch which is intended to fix
> http://llvm.org/bugs/show_bug.**cgi?id=15749<http://llvm.org/bugs/show_bug.cgi?id=15749>.
> If it's acceptable, please commit it.
>
> It replaces an auto static with a ManagedStatic<> to eliminate a race in
> multithreaded code generation (on some platforms/compilers).
>
> Thanks,
> J. Kearney
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131014/b9f36190/attachment.html>


More information about the llvm-commits mailing list