<div dir="ltr">But you've reverted it right? <div>Please, do find another fix. </div><div>Otherwise the whole project will drown in #ifdefs</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 19, 2016 at 10:07 AM, Kostya Serebryany <span dir="ltr"><<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</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"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, May 19, 2016 at 4:02 AM, Kuba Brecka <span dir="ltr"><<a href="mailto:jbrecka@apple.com" target="_blank">jbrecka@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><br><div><blockquote type="cite"><div>On 18 May 2016, at 20:00, Kostya Serebryany <<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>> wrote:</div><br><div><br><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">On Wed, May 18, 2016 at 6:00 AM, Kuba Brecka via llvm-commits<span> </span><span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Author: kuba.brecka<br>Date: Wed May 18 08:00:20 2016<br>New Revision: 269917<br><br>URL:<span> </span><a href="http://llvm.org/viewvc/llvm-project?rev=269917&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=269917&view=rev</a><br>Log:<br>[sanitizer] Fix a crash when demangling Swift symbols, take 3<br><br>The previous patch (r269291) was reverted (commented out) because the patch caused leaks that<br>were detected by LSan and they broke some lit tests.  The actual reason was that dlsym allocates<br>an error string buffer in TLS, and some LSan lit tests are intentionally not scanning TLS for<br>root pointers.  This patch simply makes LSan ignore the allocation from dlsym, because it's<br>not interesting anyway.<br><br><br>Modified:<br>   <span> </span>compiler-rt/trunk/lib/asan/asan_rtl.cc<br>   <span> </span>compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc<br><br>Modified: compiler-rt/trunk/lib/asan/asan_rtl.cc<br>URL:<span> </span><a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_rtl.cc?rev=269917&r1=269916&r2=269917&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_rtl.cc?rev=269917&r1=269916&r2=269917&view=diff</a><br>==============================================================================<br>--- compiler-rt/trunk/lib/asan/asan_rtl.cc (original)<br>+++ compiler-rt/trunk/lib/asan/asan_rtl.cc Wed May 18 08:00:20 2016<br>@@ -553,8 +553,14 @@ static void AsanInitInternal() {<br><br>   InitializeSuppressions();<br><br>-  // TODO(kuba) Fix Me.<br>-  // Symbolizer::LateInitialize();<br>+  {<br>+#if CAN_SANITIZE_LEAKS<br></blockquote><div><br></div><div>This adds one more #ifdef. </div><div>Please, can we have fewer of those? </div><div><br></div><div>if(CAN_SANITIZE_LEAKS) or similar would be much better! </div></div></div></blockquote><div><br></div></div></div></div><div>Again, I’d love to use regular ifs, but I thought doing so causes linker errors.  But, to my surprise, it seems that all my local builds work fine -- it seems that Clang just removes if(0) blocks even in debug builds.  Is that guaranteed?  </div></div></blockquote><div><br></div></div></div><div>I don't think this is really 100% guaranteed, but "if (0) code() " will usually be deleted even at -O0. </div><div>If we see linker errors we should fix them by providing the stubs for functions where they are missing.</div><span class=""><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I committed r270038 to see how the other bots like this.</div></div></blockquote><div><br></div></span><div>Thanks! </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span><font color="#888888"><div><br></div><div>Kuba</div><div><br></div><div><br></div><div><br></div></font></span></div></blockquote></div><br></div></div>
</blockquote></div><br></div>