[llvm] r271821 - Disable the use of std::call_once on PowerPC due to an apparent bug in

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 5 01:36:46 PDT 2016


Hi Chandler,

Can you please file a bug report with the relevant platform details?

 -Hal

----- Original Message -----
> From: "Chandler Carruth via llvm-commits" <llvm-commits at lists.llvm.org>
> To: llvm-commits at lists.llvm.org
> Sent: Saturday, June 4, 2016 9:46:03 PM
> Subject: [llvm] r271821 - Disable the use of std::call_once on PowerPC due to an apparent bug in
> 
> Author: chandlerc
> Date: Sat Jun  4 21:46:01 2016
> New Revision: 271821
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=271821&view=rev
> Log:
> Disable the use of std::call_once on PowerPC due to an apparent bug
> in
> libstdc++ (or in compilers, or somewhere, I can't track it down) that
> causes unittests that use INITIALIZE_PASS to crash.
> 
> The analysis I've been able to do is that inside libstdc++'s
> implementation of std::call_once, it uses pthread_once, and when that
> returns an error code it throws std::system_error which then
> eventually
> calls std::terminate.
> 
> Hopefully some of the folks who work on PPC can try to sort out
> what's
> going on here. Until then, they'll have to use the fallback
> implementation.
> 
> Modified:
>     llvm/trunk/include/llvm/Support/Threading.h
> 
> Modified: llvm/trunk/include/llvm/Support/Threading.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Threading.h?rev=271821&r1=271820&r2=271821&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Support/Threading.h (original)
> +++ llvm/trunk/include/llvm/Support/Threading.h Sat Jun  4 21:46:01
> 2016
> @@ -23,7 +23,8 @@
>  // We use std::call_once on all Unix platforms except for NetBSD
>  with
>  // libstdc++. That platform has a bug they are working to fix, and
>  they'll
>  // remove the NetBSD checks once fixed.
> -#if defined(LLVM_ON_UNIX) && !(defined(__NetBSD__) &&
> !defined(_LIBCPP_VERSION))
> +#if defined(LLVM_ON_UNIX) &&
>                                                   \
> +    !(defined(__NetBSD__) && !defined(_LIBCPP_VERSION)) &&
> !defined(__ppc__)
>  #define LLVM_THREADING_USE_STD_CALL_ONCE 1
>  #else
>  #define LLVM_THREADING_USE_STD_CALL_ONCE 0
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory


More information about the llvm-commits mailing list