<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 24, 2014 at 7:12 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu, Apr 24, 2014 at 8:03 AM, Kostya Serebryany <<a href="mailto:kcc@google.com">kcc@google.com</a>> wrote:<br>

><br>
><br>
><br>
> On Thu, Apr 24, 2014 at 6:55 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
>><br>
>> On Thu, Apr 24, 2014 at 7:48 AM, Kostya Serebryany <<a href="mailto:kcc@google.com">kcc@google.com</a>> wrote:<br>
>> > Hmm...<br>
>> > Now I am getting<br>
>> > opt: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18'<br>
>> > not<br>
>> > found<br>
>> ><br>
>> > Could your CL be the reason?<br>
>><br>
>> /maybe/... but I'd be surprised if my cl was the culprit there.<br>
><br>
> It is:<br>
><br>
> % svn up -r 207117<br>
> % ninja llvm-mc && bin/llvm-mc < /dev/null<br>
> [3/3] Linking CXX executable bin/llvm-mc<br>
>         .text<br>
><br>
> % svn up -r 207118<br>
> % ninja llvm-mc && bin/llvm-mc < /dev/null<br>
> [3/3] Linking CXX executable bin/llvm-mc<br>
> bin/llvm-mc: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version<br>
> `GLIBCXX_3.4.18' not found (required by bin/llvm-mc)<br>
><br>
><br>
><br>
>><br>
>> I<br>
>> think this has shown up when you've got a locally installed newer-gcc<br>
>> than your system GCC, and you built a binary with that (or with a<br>
>> clang that found libstdc++ from that install) and you don't have an<br>
>> updated LD_LIBRARY_PATH to point to the shared libraries to match/find<br>
>> them during execution.<br>
><br>
><br>
> Correct, LD_LIBRARY_PATH=/usr/local/gcc-4.8.2/lib64/ helps in my case.<br>
> But before your patch this was not required :(<br>
<br>
</div></div>Huh, I guess it's a backcompat thing (if old programs run against<br>
newer libstdc++ are to work, then newer programs that don't use any<br>
new library features are, incidentally, backwards compatible with<br>
older libstdc++). I hadn't realized.<br>
<div class=""><br>
> Our bots on Ubuntu 12.04 are down :(<br>
<br>
</div>I was rather happy that I hadn't seen any public buildbot fallout with<br>
that change... :/<br>
<div class=""><br>
> Well, I guess we need to fix them...<br>
<br>
</div>Indeed - but we could rollback my patch in the interim if that's going<br>
to be helpful.<br></blockquote><div><br></div><div>nah, please keep it. Our most precious bots are public and on 13.10 or 14.04.</div><div><br></div><div>--kcc </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<span class="HOEnZb"><font color="#888888"><br>
- David<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> --kcc<br>
><br>
>><br>
>><br>
>> - David<br>
>><br>
>> ><br>
>> ><br>
>> > On Thu, Apr 24, 2014 at 6:41 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Thanks for tracking down the bug, Kostya - I've applied a different<br>
>> >> fix for this in r207118. Do let me know if this still shows up/is<br>
>> >> insufficient/problematic in any way.<br>
>> >><br>
>> >> (Yay value semantics! \o/)<br>
>> >><br>
>> >> On Thu, Apr 24, 2014 at 6:43 AM, Kostya Serebryany <<a href="mailto:kcc@google.com">kcc@google.com</a>><br>
>> >> wrote:<br>
>> >> > Hi,<br>
>> >> > Here is a small patch that fixes (mostly innocent) leak in<br>
>> >> > lib/MC/MCAsmStreamer.cpp,<br>
>> >> > please review.<br>
>> >> > See also <a href="http://llvm.org/bugs/show_bug.cgi?id=19521" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=19521</a><br>
>> >> ><br>
>> >> > Index: lib/MC/MCAsmStreamer.cpp<br>
>> >> > ===================================================================<br>
>> >> > --- lib/MC/MCAsmStreamer.cpp    (revision 207084)<br>
>> >> > +++ lib/MC/MCAsmStreamer.cpp    (working copy)<br>
>> >> > @@ -9,6 +9,7 @@<br>
>> >> ><br>
>> >> >  #include "llvm/MC/MCStreamer.h"<br>
>> >> >  #include "llvm/ADT/SmallString.h"<br>
>> >> > +#include "llvm/ADT/STLExtras.h"<br>
>> >> >  #include "llvm/ADT/StringExtras.h"<br>
>> >> >  #include "llvm/ADT/Twine.h"<br>
>> >> >  #include "llvm/MC/MCAsmBackend.h"<br>
>> >> > @@ -76,7 +77,9 @@<br>
>> >> >      if (InstPrinter && IsVerboseAsm)<br>
>> >> >        InstPrinter->setCommentStream(CommentStream);<br>
>> >> >    }<br>
>> >> > -  ~MCAsmStreamer() {}<br>
>> >> > +  ~MCAsmStreamer() {<br>
>> >> > +    DeleteContainerSeconds(SymbolMap);<br>
>> >> > +  }<br>
>> >> ><br>
>> >> >    inline void EmitEOL() {<br>
>> >> >      // If we don't have any comments, just emit a \n.<br>
>> >> ><br>
>> >> ><br>
>> >> > =================================<br>
>> >> > Leak report:<br>
>> >> > Direct leak of 80 byte(s) in 1 object(s) allocated from:<br>
>> >> >     #0 0x65d4b0 in operator new(unsigned long)<br>
>> >> > llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:62<br>
>> >> >     #1 0x20d9f9e in (anonymous<br>
>> >> > namespace)::MCAsmStreamer::getOrCreateSymbolData(llvm::MCSymbol<br>
>> >> > const*)<br>
>> >> > llvm/lib/MC/MCAsmStreamer.cpp:1476<br>
>> >> >     #2 0xd4a029 in (anonymous<br>
>> >> > namespace)::ARMAsmParser::onLabelParsed(llvm::MCSymbol*)<br>
>> >> > llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:8328<br>
>> >> >     #3 0x2924e87 in (anonymous<br>
>> >> > namespace)::AsmParser::parseStatement((anonymous<br>
>> >> > namespace)::ParseStatementInfo&)<br>
>> >> > llvm/lib/MC/MCParser/AsmParser.cpp:1306<br>
>> >> >     #4 0x29123a1 in (anonymous namespace)::AsmParser::Run(bool, bool)<br>
>> >> > llvm/lib/MC/MCParser/AsmParser.cpp:651<br>
>> >> >     #5 0x18bc27f in llvm::AsmPrinter::EmitInlineAsm(llvm::StringRef,<br>
>> >> > llvm::MDNode const*, llvm::InlineAsm::AsmDialect) const<br>
>> >> > llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp:151<br>
>> >> >     #6 0x18bfc1e in<br>
>> >> > llvm::AsmPrinter::EmitInlineAsm(llvm::MachineInstr<br>
>> >> > const*) const llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp:487<br>
>> >> >     #7 0x189aa80 in llvm::AsmPrinter::EmitFunctionBody()<br>
>> >> > llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:781<br>
>> >> >     #8 0xa0d144 in runOnMachineFunction<br>
>> >> > llvm/include/llvm/CodeGen/AsmPrinter.h:193<br>
>> >> >     #9 0xa0d144 in<br>
>> >> > llvm::ARMAsmPrinter::runOnMachineFunction(llvm::MachineFunction&)<br>
>> >> > llvm/lib/Target/ARM/ARMAsmPrinter.cpp:100<br>
>> >> >     #10 0x1b0566b in<br>
>> >> > llvm::MachineFunctionPass::runOnFunction(llvm::Function&)<br>
>> >> > llvm/lib/CodeGen/MachineFunctionPass.cpp:33<br>
>> >> >     #11 0x2025905 in<br>
>> >> > llvm::FPPassManager::runOnFunction(llvm::Function&)<br>
>> >> > llvm/lib/IR/LegacyPassManager.cpp:1540<br>
>> >> >     #12 0x2025dd5 in llvm::FPPassManager::runOnModule(llvm::Module&)<br>
>> >> > llvm/lib/IR/LegacyPassManager.cpp:1560<br>
>> >> >     #13 0x2026aac in runOnModule<br>
>> >> > llvm/lib/IR/LegacyPassManager.cpp:1618<br>
>> >> >     #14 0x2026aac in<br>
>> >> > llvm::legacy::PassManagerImpl::run(llvm::Module&)<br>
>> >> > llvm/lib/IR/LegacyPassManager.cpp:1725<br>
>> >> >     #15 0x683cf7 in compileModule llvm/tools/llc/llc.cpp:355<br>
>> >> >     #16 0x683cf7 in main llvm/tools/llc/llc.cpp:201<br>
>> >> ><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div></div>