<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This needs a lot more comments!<div><br></div><div>Also, this example should probably be handled by this as well:</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #921e67">int</span> *getZero() {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "> <span style="color: #921e67">int</span> *p = 0;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(80, 143, 115); "><span class="Apple-style-span" style="color: rgb(146, 30, 103); "><span style="color: #000000"> </span>return<span style="color: #000000"> p;</span></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(80, 143, 115); "><span class="Apple-style-span" style="color: rgb(0, 0, 0); ">}</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #921e67">int</span> testReturnZero() {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(80, 143, 115); "><span style="color: #000000"> </span><span style="color: #921e67">return</span><span style="color: #000000"> *getZero(); // If you change it to '*getZero() = 1;' as in you example, it works.</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(80, 143, 115); "><span class="Apple-style-span" style="color: rgb(0, 0, 0); ">}</span></div></div><div><div><div>On Aug 24, 2012, at 9:34 AM, Jordan Rose wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Author: jrose<br>Date: Fri Aug 24 11:34:31 2012<br>New Revision: 162563<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=162563&view=rev">http://llvm.org/viewvc/llvm-project?rev=162563&view=rev</a><br>Log:<br>[analyzer] If we dereference a NULL that came from a function, show the return.<br><br>More generally, any time we try to track where a null value came from, we<br>should show if it came from a function. This usually isn't necessary if<br>the value is symbolic, but if the value is just a constant we previously<br>just ignored its origin entirely. Now, we'll step into the function and<br>recursively add a visitor to the returned expression.<br><br><<a href="rdar://problem/12114609">rdar://problem/12114609</a>><br><br>Modified:<br> cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp<br> cfe/trunk/test/Analysis/inlining/path-notes.c<br><br>Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp?rev=162563&r1=162562&r2=162563&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp?rev=162563&r1=162562&r2=162563&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp (original)<br>+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp Fri Aug 24 11:34:31 2012<br>@@ -296,6 +296,49 @@<br> return NULL;<br> }<br><br>+namespace {<br></div></blockquote>comment<br><blockquote type="cite"><div>+class ReturnNullVisitor : public BugReporterVisitorImpl<ReturnNullVisitor> {<br>+ const ExplodedNode *ReturnNode;<br>+public:<br>+ ReturnNullVisitor(const ExplodedNode *N) : ReturnNode(N) {}<br>+<br>+ virtual void Profile(llvm::FoldingSetNodeID &ID) const {<br>+ static int Tag = 0;<br>+ ID.AddPointer(&Tag);<br>+ ID.Add(*ReturnNode);<br>+ }<br>+<br>+ PathDiagnosticPiece *VisitNode(const ExplodedNode *N,<br>+ const ExplodedNode *PrevN,<br>+ BugReporterContext &BRC,<br>+ BugReport &BR) {<br>+ if (ReturnNode != BRC.getNodeResolver().getOriginalNode(N))<br>+ return 0;<br>+<br>+ StmtPoint SP = cast<StmtPoint>(ReturnNode->getLocation());<br>+ const ReturnStmt *Ret = cast<ReturnStmt>(SP.getStmt());<br>+ PathDiagnosticLocation L(Ret, BRC.getSourceManager(),<br>+ N->getLocationContext());<br>+<br>+ SmallString<64> Msg;<br>+ llvm::raw_svector_ostream Out(Msg);<br>+<br>+ if (Loc::isLocType(Ret->getRetValue()->getType()))<br>+ Out << "Returning null pointer";<br>+ else<br>+ Out << "Returning zero";<br>+<br>+ // FIXME: We should have a more generalized printing mechanism.<br>+ const Expr *RetE = Ret->getRetValue()->IgnoreParenCasts();<br>+ if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(RetE))<br>+ if (const DeclaratorDecl *DD = dyn_cast<DeclaratorDecl>(DR->getDecl()))<br>+ Out << " (loaded from '" << *DD << "')";<br>+<br>+ return new PathDiagnosticEventPiece(L, Out.str());<br>+ }<br>+};<br>+} // end anonymous namespace<br>+<br> void bugreporter::addTrackNullOrUndefValueVisitor(const ExplodedNode *N,<br></div></blockquote><br><blockquote type="cite"><div><font class="Apple-style-span" color="#000000">"..Visitor" -> "..Visitors" and let's add comments to this function as well.</font></div></blockquote><br><blockquote type="cite"><div> const Stmt *S,<br> BugReport *report) {<br>@@ -311,6 +354,9 @@<br> if (const PostStmt *ps = dyn_cast<PostStmt>(&pp)) {<br> if (ps->getStmt() == S)<br> break;<br>+ } else if (const CallExitEnd *CEE = dyn_cast<CallExitEnd>(&pp)) {<br>+ if (CEE->getCalleeContext()->getCallSite() == S)<br>+ break;<br> }<br> N = N->getFirstPred();<br> }<br>@@ -364,6 +410,28 @@<br> report->addVisitor(new TrackConstraintBRVisitor(loc::MemRegionVal(R),<br> false));<br> }<br>+ } else {</div></blockquote><div>Please, explain what we are trying to achieve here. Ex: "If the interesting statement 'S' is the call exit statement, visit its return with ReturnNullVisitor and track the returned value with undef or null visitors."</div><div>I hope I got it right:)</div><div><br></div></div><div><blockquote type="cite"></blockquote><blockquote type="cite"><div>+ // Walk backwards to just before the post-statement checks.<br></div></blockquote>This looks like it belongs to the entire else, not just the single-line 'while' loop below.<br><blockquote type="cite"><div><br></div><div>+ ProgramPoint PP = N->getLocation();<br>+ while (N && isa<PostStmt>(PP = N->getLocation()))<br>+ N = N->getFirstPred();<br>+<br>+ if (N && isa<CallExitEnd>(PP)) {<br>+ // Find a ReturnStmt, if there is one.</div></blockquote><blockquote type="cite"><div>+ do {<br>+ N = N->getFirstPred();<br>+ PP = N->getLocation();<br>+ } while (!isa<StmtPoint>(PP) && !isa<CallEnter>(PP));<br>+<br>+ if (const StmtPoint *SP = dyn_cast<StmtPoint>(&PP)) {<br>+ if (const ReturnStmt *Ret = SP->getStmtAs<ReturnStmt>()) {<br>+ if (const Expr *RetE = Ret->getRetValue()) {<br>+ report->addVisitor(new ReturnNullVisitor(N));<br></div></blockquote>comment<br><blockquote type="cite"><div>+ addTrackNullOrUndefValueVisitor(N, RetE, report);</div></blockquote><blockquote type="cite"><div>+ }<br>+ }<br>+ }<br>+ }<br> }<br> }<br><br><br>Modified: cfe/trunk/test/Analysis/inlining/path-notes.c<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/inlining/path-notes.c?rev=162563&r1=162562&r2=162563&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/inlining/path-notes.c?rev=162563&r1=162562&r2=162563&view=diff</a><br>==============================================================================<br>--- cfe/trunk/test/Analysis/inlining/path-notes.c (original)<br>+++ cfe/trunk/test/Analysis/inlining/path-notes.c Fri Aug 24 11:34:31 2012<br>@@ -57,6 +57,38 @@<br> }<br><br><br>+int *getZero() {<br>+ int *p = 0;<br>+ // expected-note@-1 {{Variable 'p' initialized to a null pointer value}}<br>+ // ^ This note checks that we add a second visitor for the return value.<br>+ return p;<br>+ // expected-note@-1 {{Returning null pointer (loaded from 'p')}}<br>+}<br>+<br>+void testReturnZero() {<br>+ *getZero() = 1; // expected-warning{{Dereference of null pointer}}<br>+ // expected-note@-1 {{Calling 'getZero'}}<br>+ // expected-note@-2 {{Returning from 'getZero'}}<br>+ // expected-note@-3 {{Dereference of null pointer}}<br>+}<br>+<br>+void testInitZero() {<br>+ // FIXME: <<a href="rdar://problem/12114689">rdar://problem/12114689</a>> Diagnostics: Need to step into the function whose result is assigned to an interesting region<br>+ int *a = getZero();<br>+ // expected-note@-1 {{Variable 'a' initialized to a null pointer value}}<br>+ *a = 1; // expected-warning{{Dereference of null pointer}}<br>+ // expected-note@-1 {{Dereference of null pointer (loaded from variable 'a')}}<br>+}<br>+<br>+void testStoreZero(int *a) {<br>+ // FIXME: <<a href="rdar://problem/12114689">rdar://problem/12114689</a>> Diagnostics: Need to step into the function whose result is assigned to an interesting region<br>+ a = getZero();<br>+ // expected-note@-1 {{Null pointer value stored to 'a'}}<br>+ *a = 1; // expected-warning{{Dereference of null pointer}}<br>+ // expected-note@-1 {{Dereference of null pointer (loaded from variable 'a')}}<br>+}<br>+<br>+<br> // CHECK: <?xml version="1.0" encoding="UTF-8"?><br> // CHECK: <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "<a href="http://www.apple.com/DTDs/PropertyList-1.0.dtd">http://www.apple.com/DTDs/PropertyList-1.0.dtd</a>"><br> // CHECK: <plist version="1.0"><br>@@ -1286,6 +1318,774 @@<br> // CHECK: <key>file</key><integer>0</integer><br> // CHECK: </dict><br> // CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>path</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>4</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>10</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>event</string><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>4</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <key>ranges</key><br>+// CHECK: <array><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>4</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>12</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </array><br>+// CHECK: <key>depth</key><integer>0</integer><br>+// CHECK: <key>extended_message</key><br>+// CHECK: <string>Calling 'getZero'</string><br>+// CHECK: <key>message</key><br>+// CHECK: <string>Calling 'getZero'</string><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>event</string><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>60</integer><br>+// CHECK: <key>col</key><integer>1</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <key>depth</key><integer>1</integer><br>+// CHECK: <key>extended_message</key><br>+// CHECK: <string>Entered call from 'testReturnZero'</string><br>+// CHECK: <key>message</key><br>+// CHECK: <string>Entered call from 'testReturnZero'</string><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>60</integer><br>+// CHECK: <key>col</key><integer>1</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>60</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>61</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>61</integer><br>+// CHECK: <key>col</key><integer>5</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>event</string><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>61</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <key>ranges</key><br>+// CHECK: <array><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>61</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>61</integer><br>+// CHECK: <key>col</key><integer>8</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </array><br>+// CHECK: <key>depth</key><integer>1</integer><br>+// CHECK: <key>extended_message</key><br>+// CHECK: <string>Variable 'p' initialized to a null pointer value</string><br>+// CHECK: <key>message</key><br>+// CHECK: <string>Variable 'p' initialized to a null pointer value</string><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>61</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>61</integer><br>+// CHECK: <key>col</key><integer>5</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>64</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>64</integer><br>+// CHECK: <key>col</key><integer>8</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>event</string><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>64</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <key>ranges</key><br>+// CHECK: <array><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>64</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>64</integer><br>+// CHECK: <key>col</key><integer>10</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </array><br>+// CHECK: <key>depth</key><integer>1</integer><br>+// CHECK: <key>extended_message</key><br>+// CHECK: <string>Returning null pointer (loaded from 'p')</string><br>+// CHECK: <key>message</key><br>+// CHECK: <string>Returning null pointer (loaded from 'p')</string><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>event</string><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>4</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <key>ranges</key><br>+// CHECK: <array><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>4</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>12</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </array><br>+// CHECK: <key>depth</key><integer>1</integer><br>+// CHECK: <key>extended_message</key><br>+// CHECK: <string>Returning from 'getZero'</string><br>+// CHECK: <key>message</key><br>+// CHECK: <string>Returning from 'getZero'</string><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>4</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>10</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>4</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>10</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>event</string><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <key>ranges</key><br>+// CHECK: <array><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>16</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </array><br>+// CHECK: <key>depth</key><integer>0</integer><br>+// CHECK: <key>extended_message</key><br>+// CHECK: <string>Dereference of null pointer</string><br>+// CHECK: <key>message</key><br>+// CHECK: <string>Dereference of null pointer</string><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>description</key><string>Dereference of null pointer</string><br>+// CHECK: <key>category</key><string>Logic error</string><br>+// CHECK: <key>type</key><string>Dereference of null pointer</string><br>+// CHECK: <key>issue_context_kind</key><string>function</string><br>+// CHECK: <key>issue_context</key><string>testReturnZero</string><br>+// CHECK: <key>issue_hash</key><integer>1</integer><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>69</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>path</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>5</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>12</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>18</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>5</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>12</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>18</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>12</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>18</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>5</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>event</string><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <key>ranges</key><br>+// CHECK: <array><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>8</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </array><br>+// CHECK: <key>depth</key><integer>0</integer><br>+// CHECK: <key>extended_message</key><br>+// CHECK: <string>Variable 'a' initialized to a null pointer value</string><br>+// CHECK: <key>message</key><br>+// CHECK: <string>Variable 'a' initialized to a null pointer value</string><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>77</integer><br>+// CHECK: <key>col</key><integer>5</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>79</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>79</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>event</string><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>79</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <key>ranges</key><br>+// CHECK: <array><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>79</integer><br>+// CHECK: <key>col</key><integer>4</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>79</integer><br>+// CHECK: <key>col</key><integer>4</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </array><br>+// CHECK: <key>depth</key><integer>0</integer><br>+// CHECK: <key>extended_message</key><br>+// CHECK: <string>Dereference of null pointer (loaded from variable 'a')</string><br>+// CHECK: <key>message</key><br>+// CHECK: <string>Dereference of null pointer (loaded from variable 'a')</string><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>description</key><string>Dereference of null pointer (loaded from variable 'a')</string><br>+// CHECK: <key>category</key><string>Logic error</string><br>+// CHECK: <key>type</key><string>Dereference of null pointer</string><br>+// CHECK: <key>issue_context_kind</key><string>function</string><br>+// CHECK: <key>issue_context</key><string>testInitZero</string><br>+// CHECK: <key>issue_hash</key><integer>4</integer><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>79</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>path</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>7</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>13</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>7</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>13</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>7</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>13</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>event</string><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <key>ranges</key><br>+// CHECK: <array><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>15</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </array><br>+// CHECK: <key>depth</key><integer>0</integer><br>+// CHECK: <key>extended_message</key><br>+// CHECK: <string>Null pointer value stored to 'a'</string><br>+// CHECK: <key>message</key><br>+// CHECK: <string>Null pointer value stored to 'a'</string><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>control</string><br>+// CHECK: <key>edges</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>start</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>85</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>end</key><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>87</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>87</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>kind</key><string>event</string><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>87</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <key>ranges</key><br>+// CHECK: <array><br>+// CHECK: <array><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>87</integer><br>+// CHECK: <key>col</key><integer>4</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>87</integer><br>+// CHECK: <key>col</key><integer>4</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: </array><br>+// CHECK: <key>depth</key><integer>0</integer><br>+// CHECK: <key>extended_message</key><br>+// CHECK: <string>Dereference of null pointer (loaded from variable 'a')</string><br>+// CHECK: <key>message</key><br>+// CHECK: <string>Dereference of null pointer (loaded from variable 'a')</string><br>+// CHECK: </dict><br>+// CHECK: </array><br>+// CHECK: <key>description</key><string>Dereference of null pointer (loaded from variable 'a')</string><br>+// CHECK: <key>category</key><string>Logic error</string><br>+// CHECK: <key>type</key><string>Dereference of null pointer</string><br>+// CHECK: <key>issue_context_kind</key><string>function</string><br>+// CHECK: <key>issue_context</key><string>testStoreZero</string><br>+// CHECK: <key>issue_hash</key><integer>4</integer><br>+// CHECK: <key>location</key><br>+// CHECK: <dict><br>+// CHECK: <key>line</key><integer>87</integer><br>+// CHECK: <key>col</key><integer>3</integer><br>+// CHECK: <key>file</key><integer>0</integer><br>+// CHECK: </dict><br>+// CHECK: </dict><br> // CHECK: </array><br> // CHECK: </dict><br> // CHECK: </plist><br><br><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></div></blockquote></div><br></div></body></html>