<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Dec 25, 2013, at 11:55 PM, Kostya Serebryany <<a href="mailto:kcc@google.com">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 class="im"><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>[ 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><br></div><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><div><br></div><div>— Marshall</div><div><br></div></body></html>