Browse > Article

A Static Analyzer for Detecting Memory Leaks based on Procedural Summary  

Jung, Yung-Bum (서울대학교 컴퓨터공학부)
Yi, Kwang-Keun (서울대학교 컴퓨터공학부)
Abstract
We present a static analyzer that detects memory leaks in C programs. It achieves relatively high accuracy at a relatively low cost on SPEC2000 benchmarks and several open-source software packages, demonstrating its practicality and competitive edge against other reported analyzers: for a set of benchmarks totaling 1,777 KLOCs, it found 332 bugs with 47 additional false positives (a 12.4% false-positive ratio), and the average analysis speed was 720 LOC/sec. We separately analyze each procedure's memory behavior into a summary that is used in analyzing its call sites. Each procedural summary is parameterized by the procedure's call context so that it can be instantiated at different call sites. What information to capture in each procedural summary has been carefully tuned so that the summary should not lose any common memory-leak-related behaviors in real-world C program. Because each procedure is summarized by conventional fixpoint iteration over the abstract semantics ('a la abstract interpretation), the analyzer naturally handles arbitrary call cycles from direct or indirect recursive calls.
Keywords
Abstract Interpretation; Memory Leaks; Static Program Analysis; Procedural Summary; Escape Analysis;
Citations & Related Records
연도 인용수 순위
  • Reference
1 Yichen Xie and Alex Aiken, Context- and Pathsensitive Memory Leak Detection, In ESEC/FSE-13: Proceedings of the 10th European Software Engineering Conference held jointly with 13th ACM SIGSOFT international symposium on Foundations of Software Engineering, pp.115-125, New York, NY, USA, 2005. ACM   DOI
2 Bruno Blanchet, Patrick Cousot, Radhia Cousot, Jerome Feret, Laurent Mauborgne, Antoine Mine, David Monniaux, and Xavier Rival, A static analyzer for large safety-critical software, In PLDI'03: Proceedings of the ACM SIGPLAN 2003 conference on Programming Language Design and Implementation, pp.196-207, New York, NY, USA, 2003. ACM Press
3 Erick M. Nystrom, H.-S. Kim, and Wen mei W. Hwu, Bottom-up and Top-down Context-sensitive Summary-based Pointer Analysis, In the proceeding of the 11th Annual International Static Analysis Symposium, Lecture Notes in Computer Science. Springer, 2006
4 John Whaley and Martin Rinard, Compositional Pointer and Escape Analysis for Java Programs, In Proceddings of ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, pp.187-206, 1999   DOI
5 M. Das, S. Lerner, and M. Seigle, ESP: Pathsensitive program verification in polynomial time, In Proc. Conference on Programming Language Design and Implementation, pp.57-68, 2002   DOI
6 David, L. Heine and Monica, S. Lam, A Practical Flow-sensitive and Context-sensitive C and C++ Memory Leak Detector, In Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation, pp.168-181, 2003   DOI
7 Manuvir Das, Sorin Lerner, and Mark Seigle, ESP: Path-sensitive Program Verification in Polynomial Time, In Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, pp.57-68, June 2002   DOI
8 David L. Heine and Monica S. Lam, Static Detection of Leaks in Polymorphic Containers. In ICSE'06: Proceeding of the 28th international conference on Software Engineering, pp.252-261, New York, ACM Press   DOI
9 David Evans, Static Detection of Dynamic Memory Errors, In Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language Design and Implementation, pp.44-53, May 1996   DOI
10 M. Orlovich and R. Rugina, Memory Leak Analysis by Contradiction, In SAS 2006: 13th Annual International Static Analysis Symposium, Lecture Notes in Computer Science, Springer, 2006
11 Cristiano Calcagno, Dino Distefano, Peter O'hearn, and Hongseok Yang, Footprint Analysis: A Shape Analysis That Discovers Preconditions, In SAS 2007: 14th Annual International Static Analysis Symposium, Lecture Notes in Computer Science, Springer, 2007   DOI   ScienceOn
12 Patrick Cousot and Radhia Cousot, Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints, In Proceddings of ACM Symposium on Principles of Programming Languages, pp.238-252, January 1977   DOI
13 J. Reynolds, Separation Logic: A Logic for Shared Mutable Data Structures, In Proceedings of the 17th Annual IEEE Symposium on Logic in Computer Science, 2002   DOI
14 Sigmund Cherem, Lonnie Princehouse, and Radu Rugina, Practical Memory Leak Detection Using Guarded Value-flow Analysis, SIGPLAN 2007   DOI
15 Yichen Xie and Alex Aiken, Scalable Error Detection Using Boolean Satisfiability, In POPL'05: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp.351-363, New York, NY, USA, 2005. ACM   DOI