<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 18 May 2016, at 20:00, Kostya Serebryany <<a href="mailto:kcc@google.com" class="">kcc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Wed, May 18, 2016 at 6:00 AM, Kuba Brecka via llvm-commits<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><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 class="">Date: Wed May 18 08:00:20 2016<br class="">New Revision: 269917<br class=""><br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=269917&view=rev" rel="noreferrer" class="">http://llvm.org/viewvc/llvm-project?rev=269917&view=rev</a><br class="">Log:<br class="">[sanitizer] Fix a crash when demangling Swift symbols, take 3<br class=""><br class="">The previous patch (r269291) was reverted (commented out) because the patch caused leaks that<br class="">were detected by LSan and they broke some lit tests.  The actual reason was that dlsym allocates<br class="">an error string buffer in TLS, and some LSan lit tests are intentionally not scanning TLS for<br class="">root pointers.  This patch simply makes LSan ignore the allocation from dlsym, because it's<br class="">not interesting anyway.<br class=""><br class=""><br class="">Modified:<br class="">   <span class="Apple-converted-space"> </span>compiler-rt/trunk/lib/asan/asan_rtl.cc<br class="">   <span class="Apple-converted-space"> </span>compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc<br class=""><br class="">Modified: compiler-rt/trunk/lib/asan/asan_rtl.cc<br class="">URL:<span class="Apple-converted-space"> </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" class="">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_rtl.cc?rev=269917&r1=269916&r2=269917&view=diff</a><br class="">==============================================================================<br class="">--- compiler-rt/trunk/lib/asan/asan_rtl.cc (original)<br class="">+++ compiler-rt/trunk/lib/asan/asan_rtl.cc Wed May 18 08:00:20 2016<br class="">@@ -553,8 +553,14 @@ static void AsanInitInternal() {<br class=""><br class="">   InitializeSuppressions();<br class=""><br class="">-  // TODO(kuba) Fix Me.<br class="">-  // Symbolizer::LateInitialize();<br class="">+  {<br class="">+#if CAN_SANITIZE_LEAKS<br class=""></blockquote><div class=""><br class=""></div><div class="">This adds one more #ifdef. </div><div class="">Please, can we have fewer of those? </div><div class=""><br class=""></div><div class="">if(CAN_SANITIZE_LEAKS) or similar would be much better! </div></div></div></blockquote><div><br class=""></div></div><div class="">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?  I committed r270038 to see how the other bots like this.</div><div class=""><br class=""></div><div class="">Kuba</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>