If you're linking against liblldb you can't rely on the os cleaning up because you could unload liblldb before shutting down the process.<br><br>Also it's good practice to do explicit cleanup since its not always just a simple matter of releasing resources, sometimes actual shutdown code needs to be interspersed with the cleanup <br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 1, 2016 at 3:15 PM Kate Stone via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<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">Greg Clayton will almost certainly want to weigh in here when he returns next week.  Generally speaking, we’ve had a long tail of issues that only show up during teardown that we’re avoiding.  Leaking resources that will be reclaimed by the OS when the process terminates is a non-issue.  If there are specific scenarios where a long-lived process leaks significant content that isn’t an effective cache for subsequent use, please outline how that manifests.<div><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="font-family:LucidaGrande;word-wrap:break-word"><div style="word-wrap:break-word"><font color="#424242" style="font-family:'Lucida Grande';font-size:x-small">Kate Stone</font><span style="font-family:'Lucida Grande';font-size:x-small"> </span><font color="#009193" style="font-family:'Lucida Grande';font-size:x-small"><a href="mailto:k8stone@apple.com" target="_blank">k8stone@apple.com</a></font></div><div style="font-family:Times;word-wrap:break-word"><font face="Lucida Grande" size="1"><font color="#009193"></font> Xcode <font color="#424242">Low Level Tools</font></font></div></div></div></div></div></div>
</div>
<br><div><blockquote type="cite"></blockquote></div></div></div><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div>On Aug 1, 2016, at 2:40 PM, Vedant Kumar via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:</div><br class="m_7875846825671040214Apple-interchange-newline"></blockquote></div></div></div><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div><div>Hi lldb-dev,<br><br>It looks like the debugger initializes static variables in llvm (see:<br>SystemInitializerFull::Initialize()), but, AFAICT, it never cleans them up.<br><br>Does this cause memory leaks? I'd assumed that it's necessary to call<br>llvm_shutdown() somewhere to avoid this kind of leak.<br><br>Is there a buildbot I can check that tests an address-sanitized version of<br>lldb?<br><br>thanks,<br>vedant<br></div></div></blockquote></div></div></div><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div><div>_______________________________________________<br>lldb-dev mailing list<br><a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br></div></div></blockquote></div><br></div></div>_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
</blockquote></div>