callgraph improvements using pointer argument pattern #101
Labels
discussion
Maintainers are inviting discussion.
enhancement
New feature or request
vet-bot
the issue is part of VetBot's responsibility
Once #28 lands, there will be one more thing we can use in the call-graph to disambiguate nodes without using any type information.
Whether we want to do this depends entirely on how many false-positives we see. (EDIT: maybe not; I kind of just want to do it...)
We can use name, arity, and the pattern of pointer arguments to uniquely identify a function in the callgraph.
For instance, a function
would have signature
{foo, 3, [false, true, false]}
.We can easily construct this graph for function signatures. However, using the graph at the call-site without type information is a little bit trickier. We can use the position where the pointer argument(s) are being passed to lookup the set of all the nodes in the call-graph whose signatures match and run our BFS starting from those nodes.
That lookup is only a tiny bit tricky. I think it's easiest trading off space for time by using an index.
Functions which do not take any pointer arguments are also totally useless for our purposes. I think we can just ignore them in every case (see #102). Any edges which we may miss couldn't have a pointer crossing them in any case.
The text was updated successfully, but these errors were encountered: