<div dir="ltr">The versions I'm using right now are<div><br></div><div>* gcc: (Debian/Linaro 4.9.1-14) 4.9.1</div><div>* libstdc++: libstdc++.so.6.0.20</div><div><br></div><div>Thanks,</div><div>-Jiangning</div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-05 4:46 GMT+08:00 Chris Bieneman <span dir="ltr"><<a href="mailto:beanz@apple.com" target="_blank">beanz@apple.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Adding Jiangning Liu to the thread.<br>
<br>
Jiangning reported a similar issue on the llvm-commits list on Debian aarch64.<br>
<br>
In general it sounds like std::call_once may not really be bug free.<br>
<br>
Jiangning, can you please provide your gcc/libstdc++ version?<br>
<br>
Thanks,<br>
-Chris<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> On Nov 4, 2014, at 9:38 AM, Bill Schmidt <<a href="mailto:wschmidt@linux.vnet.ibm.com">wschmidt@linux.vnet.ibm.com</a>> wrote:<br>
><br>
> On Tue, 2014-11-04 at 12:17 -0500, Samuel F Antao wrote:<br>
>> Ok, I'll put a patch together to fix this later today. I'll probably<br>
>> do what Reid was suggesting and use what is already in there for<br>
>> Windows.<br>
><br>
> Hm, better hold off on that. Ulrich Weigand has noted that there is<br>
> invalid code generation occurring around a TLS call. Looks like is is<br>
> probably a PPC back end problem at the moment.<br>
><br>
> Thanks,<br>
> Bill<br>
><br>
>><br>
>> Thanks,<br>
>> Samuel<br>
>><br>
>> Bill Schmidt <<a href="mailto:wschmidt@linux.vnet.ibm.com">wschmidt@linux.vnet.ibm.com</a>> wrote on 11/04/2014<br>
>> 12:11:08 PM:<br>
>><br>
>>> From: Bill Schmidt <<a href="mailto:wschmidt@linux.vnet.ibm.com">wschmidt@linux.vnet.ibm.com</a>><br>
>>> To: Samuel F Antao/Watson/IBM@IBMUS<br>
>>> Cc: <a href="mailto:azanella@linux.vnet.ibm.com">azanella@linux.vnet.ibm.com</a>, <a href="mailto:beanz@apple.com">beanz@apple.com</a>, Hal Finkel<br>
>>> <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>>, LLVM Dev <<a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>><br>
>>> Date: 11/04/2014 12:11 PM<br>
>>> Subject: Re: Issue with std::call_once in PPC64 platform<br>
>>><br>
>>> On Tue, 2014-11-04 at 11:59 -0500, Samuel F Antao wrote:<br>
>>>> Hi Bill,<br>
>>>><br>
>>>> You can find the same issue in the buildbot:<br>
>>>><br>
>>>> <a href="http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/" target="_blank">http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/</a><br>
>>> 16444/steps/compile.llvm.stage2/logs/stdio<br>
>>>><br>
>>>> It is failing for me both in BE (gcc 4.8.2) and LE(4.9.1). I am<br>
>>>> compiling with clang 3.5, but those are the gcc toolchains I am<br>
>> using.<br>
>>>><br>
>>>> What do you think is the best way to fix this?<br>
>>><br>
>>> I don't know what the best fix is, but clearly a fix or revert is<br>
>> needed<br>
>>> since the patch is breaking some platforms.<br>
>>><br>
>>> Thanks,<br>
>>> Bill<br>
>>><br>
>>>><br>
>>>> Thanks!<br>
>>>> Samuel<br>
>>>><br>
>>>> Bill Schmidt <<a href="mailto:wschmidt@linux.vnet.ibm.com">wschmidt@linux.vnet.ibm.com</a>> wrote on 11/04/2014<br>
>>>> 11:45:06 AM:<br>
>>>><br>
>>>>> From: Bill Schmidt <<a href="mailto:wschmidt@linux.vnet.ibm.com">wschmidt@linux.vnet.ibm.com</a>><br>
>>>>> To: Samuel F Antao/Watson/IBM@IBMUS<br>
>>>>> Cc: LLVM Dev <<a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>>, <a href="mailto:beanz@apple.com">beanz@apple.com</a>, Hal Finkel<br>
>>>>> <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>>, <a href="mailto:azanella@linux.vnet.ibm.com">azanella@linux.vnet.ibm.com</a><br>
>>>>> Date: 11/04/2014 11:45 AM<br>
>>>>> Subject: Re: Issue with std::call_once in PPC64 platform<br>
>>>>><br>
>>>>> Hi Samuel,<br>
>>>>><br>
>>>>> I haven't encountered this problem. What gcc/libstdc++ are you<br>
>>>> using?<br>
>>>>> BE or LE?<br>
>>>>><br>
>>>>> Copying Adhemerval in case he has heard of any related issues.<br>
>>>>><br>
>>>>> Thanks,<br>
>>>>> Bill<br>
>>>>><br>
>>>>> On Mon, 2014-11-03 at 20:19 -0500, Samuel F Antao wrote:<br>
>>>>>> Hi all,<br>
>>>>>><br>
>>>>>> I observe that r220932 (Removing the static initializer in<br>
>>>>>> ManagedStatic.cpp by using llvm_call_once to initialize the<br>
>>>>>> ManagedStatic mutex.) is causing tablegen to segfault in PPC<br>
>>>> platforms<br>
>>>>>> during static initialization. The crash happens while calling<br>
>>>>>> std::call_once introduced by this patch in the wrapper used<br>
>> in<br>
>>>>>> getManagedStaticMutex.<br>
>>>>>><br>
>>>>>> I understand this call is buggy for some platforms (or<br>
>> probably<br>
>>>> some<br>
>>>>>> oldish libstdc++ versions). Is this a known issue? Should we<br>
>> guard<br>
>>>>>> LLVM_DEFINE_ONCE_FLAG definition with platform specific macros<br>
>> to<br>
>>>>>> avoid the crash, at least for the moment?<br>
>>>>>><br>
>>>>>> Thanks!<br>
>>>>>> Samuel<br>
>>>>>><br>
>>>>>><br>
>>>>><br>
>>>>><br>
>>>><br>
>>>><br>
>>><br>
>>><br>
>><br>
>><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>