<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Feb 20, 2013, at 6:58 AM, gerardjubile <<a href="mailto:shahar.golan.mail@gmail.com">shahar.golan.mail@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I am trying to write a new BugReporterVisitor to mark the traces of an SVal.<br>This BugReporterVisitor will be created an SVal usage causes a report, and<br>it needs to mark the traces of this SVAL.<br><br>In the following example, when checking the function call in line 5, I can<br>see that this is an allocation and by looking at the SVal of the argument, I<br>see that the allocation is of 0 bytes:<br><br>1  void *f(int i) {<br>2    int a = 0;<br>3    int b = a/i;<br>4    int c = b;<br>5    return malloc(c);<br>6  }<br><br>In the report for line 5 I would like to mark all the expressions that led<br>to the computation of the SVal.<br><br>My questions:<br>1. Can any of the existing BugReporterVisitor assist me?<br></blockquote><div><br></div><div>No, we do not have any visitors that track ALL the expressions that participate in a computation of a particular value. However, marking a symbol as interesting in the BugReport (BugReport::<span style="color: rgb(49, 89, 93); font-family: Menlo;">markInteresting</span>) is intended to address this case. Have you tried marking your symbol as interesting? Is it sufficient?</div><br><blockquote type="cite">2. If not, can anyone suggest guidelines to coding such a<br>BugReporterVisitor?<br></blockquote><div><br></div>The amount of tracking we can do is bounded by the info recorded in ExplodedNodes. For example, we should be able to identify the ExplodedNode where the value ('0') was first assigned to the symbol which we are tracking, as this information will be recoded in the constraint manager.</div><div><br></div><div>See MallocChecker.cpp, BugReporterVisitors.cpp for more info and examples of the visitors.</div><div><br></div><div>Cheers,</div><div>Anna.<br><blockquote type="cite"><br>Thanks, Gerard.<br><br><br><br><br>--<br>View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/Traces-of-SVal-in-BugReporterVisitor-tp4030520.html">http://clang-developers.42468.n3.nabble.com/Traces-of-SVal-in-BugReporterVisitor-tp4030520.html</a><br>Sent from the Clang Developers mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></body></html>