<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jun 18, 2013, at 2:51 AM, Karthik Bhat <<a href="mailto:blitz.opensource@gmail.com">blitz.opensource@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="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;"><div dir="ltr">Hi,<div>I'm working with SimpleStreamChecker (3.2 Version). </div><div><br></div></div></div></blockquote><div dir="auto"><br></div>It's best to work with TOT.</div><div dir="auto"><br><blockquote type="cite"><div style="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;"><div dir="ltr"><div>For a code like -</div><div><br></div><div>void dummyClose(FILE* fp) {</div><div> return;</div><div>}</div><div><br></div><div>int main() {</div><div> FILE* fp = fopen("myfile","w");<br></div><div> dummyClose(fp);</div><div> return 0;</div><div>}</div><div><br></div><div>i'm unable to get checkDeadSymbol callback when symbol corresponding to FILE* fp dies. </div><div><br></div><div>Could anyone please let me know if something is going wrong?</div><div><br></div><div>I'm running clang++ -cc1 -analyze -analyzer-checker=alpha.unix.SimpleStream test.cpp</div><div><br></div></div></div></blockquote><div dir="auto"><br></div><div dir="auto">Do you see a warning issued?</div><div dir="auto"><br></div><div dir="auto">When analyzing this code with TOT clang, I get:</div><div dir="auto"><div style="margin: 0px; font-size: 11px; font-family: Menlo;">clang -cc1 -analyze -analyzer-checker=core,alpha.unix.SimpleStream ~/tmp/ex.c</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">/Users/zaks/tmp/ex.c:9:2: warning: Opened file is never closed; potential resource leak</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> return 0;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> ^~~~~~~~</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">1 warning generated.</div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Also, even though it might not be relevant in this case, it is useful to always include core in the list of checkers you are running.</div><div dir="auto"><br></div><div dir="auto">Cheers,</div>Anna.</div><div dir="auto"><br><blockquote type="cite"><div style="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;"><div dir="ltr"><div>Thanks and Regards</div><div>Karthik</div></div>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a></div></blockquote></div><br></body></html>