Baltoli / project-docs

Documents for my Part III project
0 stars 0 forks source link

Less conservative control path analysis #12

Closed Baltoli closed 7 years ago

Baltoli commented 7 years ago

When finding the set of functions that are 'control-reachable' from the bounding function, it shouldn't be too hard to ignore or filter the ones that can't affect the lock. The factors that go into this decision are:

In theory it would be possible to circumvent this analysis by having a function take a void *, but is this bad enough behaviour in regard to aliasing that I can just ignore the possibility?

Baltoli commented 7 years ago

In fact this is a little more subtle - the called functions will cause an assertion failure even if they cannot access the lock (e.g. if it's a parameter), by calling lock_acquire or lock_release on another lock.

So it's not so easy to discount functions as described above - instead probably need a call graph.

Baltoli commented 7 years ago

Can we use the LLVM 3.4 CallGraph pass to do this?

Baltoli commented 7 years ago

In fact, this isn't what we want to be doing - any call to the acquire or release functions will cause a runtime error. This means that we don't want to discount paths where the actual lock variable couldn't reach itself, and so the current implementation is right.