[LLVMdev] Issue with std::call_once in PPC64 platform

Reid Kleckner rnk at google.com
Mon Nov 3 17:56:28 PST 2014


The MSVC STL has a similar problem, and call_once isn't available in
mingw64-win32. We have some hand-rolled double checked locking that you can
probably use to workaround it.

That said, in the long term I would like to be able to rely on standard
C++11 constructs.

On Mon, Nov 3, 2014 at 5:19 PM, Samuel F Antao <sfantao at us.ibm.com> wrote:

> Hi all,
>
> I observe that r220932 (Removing the static initializer in
> ManagedStatic.cpp by using llvm_call_once to initialize the ManagedStatic
> mutex.) is causing tablegen to segfault in PPC platforms during static
> initialization. The crash happens while calling  std::call_once introduced
> by this patch in the wrapper used in getManagedStaticMutex.
>
> I understand this call is buggy for some platforms (or probably some
> oldish libstdc++ versions). Is this a known issue? Should we guard
> LLVM_DEFINE_ONCE_FLAG definition with platform specific macros to avoid the
> crash, at least for the moment?
>
> Thanks!
> Samuel
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141103/26a7aad0/attachment.html>


More information about the llvm-dev mailing list