Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

analyze function calls in Traverse/Unlink #1

Open
amccreight opened this issue Jul 25, 2011 · 0 comments
Open

analyze function calls in Traverse/Unlink #1

amccreight opened this issue Jul 25, 2011 · 0 comments

Comments

@amccreight
Copy link
Owner

It is not uncommon for a class to factor out common code between its Unlink and destructor into a function, then invoke that function in both places. We should be able to analyze fields unlinked in subcalls in this manner.

To properly handle this situation, we need to track the set of functions that are called in Traverse/Unlink, analyze these functions, then add the fields the calls touch to the set of fields touched by the Traverse/Unlink function. Doing this will probably require doing delayed analysis, as the subroutine could potentially be defined before or after the Traverse/Unlink.

Examples:

  • NotificationController's Unlink (in accessible/src/base/NotificationController.cpp) invokes Shutdown() to unlink many things
  • nsDOMAttributeMap's Unlink (in content/base/src) invokes DropReference() to unlink mAttributeCache.
  • nsRange's Unlink (in content/base/src)
  • nsInProcessTabChildGlobal's Traverse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant