Proceedings of the 11th ACM SIGSOFT International
Proceedings of the 11th ACM SIGSOFT International Symposium on the Foundations of Software Engineering (FSE-11) Year 2003 Peer-reviewed
Web Security · Privacy

Tracking Pointers with Path and Context Sensitivity for Bug Detection in C

V. Benjamin Livshits Monica S. Lam
2003
Publication year
FSE
Venue
Peer-reviewed
Type

Problem

This paper proposes a pointer alias analysis for automatic error detection. State-of-the-art pointer alias analyses are either too slow or too imprecise for finding errors in reallife programs. We propose a hybrid pointer analysis that tracks actively manipulated pointers held in local variables and parameters accurately with path and context sensitivity and handles pointers stored in recursive data structures less precisely but efficiently.

Approach

We make the unsound assumption that pointers passed into a procedure, in parameters, global variables, and locations reached by applying simple access paths to parameters and global variables, are all distinct from each other and from any other locations. This assumption matches the semantics of many functions, reduces spurious aliases and speeds up the analysis. We present a program representation, called IPSSA, which captures intraprocedural and interprocedural definition-use relationships of directly and indirectly accessed memory locations.

Results

This representation makes it easy to create demanddriven path-sensitive and context-sensitive analyses. We demonstrate how a program checker based on IPSSA can be used to find security violations. Our checker, when applied to 10 programs, found 6 new violations and 8 previously reported ones. The checker generated only one false warning, suggesting that our approach is effective in creating practical and easy-to-use bug detection tools.

Cite this paper — BibTeX
@InProceedings{livshits03tracking,
  author = "V. Benjamin Livshits and Monica S. Lam",
  title = "Tracking Pointers with Path and Context Sensitivity for Bug Detection in {C} Programs",
  booktitle = "Proceedings of the 11th ACM SIGSOFT International Symposium on the Foundations of Software Engineering (FSE-11)",
  month = sep,
  year = "2003",
  location = "Helsinki, Finland",
  publisher = "ACM",
}
Copied