<div dir="ltr">(I mean the gold bug)</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 4, 2017 at 12:15 PM, Peter Collingbourne <span dir="ltr"><<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Can we set the nounwind attribute on the constructor to work around the clang bug?<div><br></div><div>Peter</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Thu, May 4, 2017 at 12:11 PM, Evgenii Stepanov via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I agree, I'll add a clang flag for this which will be disabled by default.<br>
<div class="m_3234728452896809880HOEnZb"><div class="m_3234728452896809880h5"><br>
On Thu, May 4, 2017 at 2:42 AM, Chandler Carruth <<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>> wrote:<br>
> On Thu, Apr 27, 2017 at 1:40 PM Evgeniy Stepanov via llvm-commits<br>
> <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
>><br>
>> Author: eugenis<br>
>> Date: Thu Apr 27 15:27:23 2017<br>
>> New Revision: 301586<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=301586&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=301586&view=rev</a><br>
>> Log:<br>
>> [asan] Put ctor/dtor in comdat.<br>
>><br>
>> When possible, put ASan ctor/dtor in comdat.<br>
>><br>
>> The only reason not to is global registration, which can be<br>
>> TU-specific. This is not the case when there are no instrumented<br>
>> globals. This is also limited to ELF targets, because MachO does<br>
>> not have comdat, and COFF linkers may GC comdat constructors.<br>
>><br>
>> The benefit of this is a lot less __asan_init() calls: one per DSO<br>
>> instead of one per TU. It's also necessary for the upcoming<br>
>> gc-sections-for-globals change on Linux, where multiple references to<br>
>> section start symbols trigger quadratic behaviour in gold linker.<br>
>><br>
>> This is a second re-land of r298756. This time with a flag to disable<br>
>> the whole thing to avoid a bug in the gold linker:<br>
>>   <a href="https://sourceware.org/bugzilla/show_bug.cgi?id=19002" rel="noreferrer" target="_blank">https://sourceware.org/bugzil<wbr>la/show_bug.cgi?id=19002</a><br>
><br>
><br>
> Evgeniy, I strongly disagree with the default here.<br>
><br>
> This bug in gold is likely to be encountered by anyone using a Linux distro<br>
> with binutils before v2.27 and using gold. Given how slow the BFD linker is<br>
> compared to gold, that's likely a *lot* of users of LLVM *if* their version<br>
> of binutils in that old.<br>
><br>
> Unfortunately, both LTS versions of Ubuntu (and every version including<br>
> Xenial and older) have too old of a version of gold. Debian stable has too<br>
> old of a version. Fedora 25 and older, OpenSuSE 42 and earlier, all have too<br>
> old of versions of gold.<br>
><br>
> I think that this feature needs to be defaulted off. If you want to detect<br>
> LLD (which is likely to be installed *with* LLVM at least) or detect<br>
> versions to enable this, great. But I think defaulting this on is really the<br>
> wrong thing for our users. We're essentially leaving a usability landmine in<br>
> ASan, with no advertisement, and just letting users figure out why and how<br>
> to update their linker. That doesn't seem right.<br>
><br>
> Anyways, that's my 2 cents.<br>
> -Chandler<br>
</div></div><div class="m_3234728452896809880HOEnZb"><div class="m_3234728452896809880h5">______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_3234728452896809880gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</div>