[cfe-dev] Traces of SVal in BugReporterVisitor
ganna at apple.com
Sat Feb 23 14:14:34 PST 2013
On Feb 22, 2013, at 11:52 AM, gerardjubile <shahar.golan.mail at gmail.com> wrote:
> Thanks for your answers.
> I really hoped that there is a way to mark the SVal's symbol as interesting
> will do the trick :(
> Would implementing this be difficult?
It will not be trivial from the implementation point - there is no notion of a value being propagated through the analysis path, instead you have a sequence of ExplodedNodes, so you would have to walk the path and examine exploded nodes to see what changed and use heuristics to see if the change is something you should be observing. In addition, it is also not clear what to track. For example, for 'x = a + b' if 'x' is being tracked, should you start tracking 'a' and 'b'? What if the value of 'x' depends on a condition, ex: 'if (c) x = a else x = b', should you start tracking assignments to 'c' as well? Determining what is interesting might require some sort of program slicing solution (http://en.wikipedia.org/wiki/Program_slicing). Also, we do not want to overpower users with too much info.
I would suggest starting with small incremental improvements. For example, use the existing visitors, which other checkers use. Adding a visitor to the BugReport is as easy as marking a symbol interesting.
The next step would be to see what is missing and try to enhance those visitors or write your own version, which solves a particular problem - adds a missing node along a path.
> Could you guide me through this?
> If it is to complicated for a newbie like me, I will try to follow the
> example in bugreporter::trackNullOrundefValue.
> Thanks, Gerard.
> View this message in context: http://clang-developers.42468.n3.nabble.com/Traces-of-SVal-in-BugReporterVisitor-tp4030520p4030576.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev