<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 10, 2014 at 12:53 AM, Marshall Clow <span dir="ltr"><<a href="mailto:mclow.lists@gmail.com" target="_blank">mclow.lists@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 style="word-wrap:break-word"><div class="im">On Dec 25, 2013, at 11:55 PM, Kostya Serebryany <<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>> wrote:<br>
<div><blockquote type="cite"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 26, 2013 at 11:49 AM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><br><div class="gmail_quote">
On Thu, Dec 26, 2013 at 2:40 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Like this? <div><br></div><div><div>+extern "C" {</div><div>+// Disable LeakSanitizer, see <a href="http://llvm.org/bugs/show_bug.cgi?id=18325" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=18325</a>.</div>
</div></div></blockquote></div><br></div>We don't often reference bugs in comments. I would give a brief summary in the text of the comment, and mention the bug in the commit log.</div></div></blockquote></div></div></blockquote>
<div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
<div class="gmail_extra"><br></div></div></blockquote></div></div></div><blockquote type="cite"><div dir="ltr">This? <div><br></div><div><div>+extern "C" {</div><div>+// Disable LeakSanitizer for this binary as it has too many leaks that are not</div>
<div>+// very interesting to fix. __lsan_is_turned_off is explained in</div>
<div>+// compiler-rt/include/sanitizer/lsan_interface.h</div><div>+int __lsan_is_turned_off() { return 1; }</div><div>+}  // extern “C"</div></div></div></blockquote><br></div></div><div>[ Sorry to be joining the conversation late ]</div>
<div><br></div><div>What is the reasoning behind having them define a function to disable lsan, rather than calling __lsan_disable?</div><div>Is it so that lsan can be turned off before main() is entered?</div></div></blockquote>
<div><br></div><div>Yes. Also, this allows us to disable lsan w/o modifying the source file where main() is defined</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">
<div style="word-wrap:break-word"><div>I’m not really happy with the idea of the user having to define a function with a reserved name in their code.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>— Marshall</div>
<div><br></div></font></span></div></blockquote></div><br></div></div>