ACM Home Page
Please provide us with feedback. Feedback
Static detection of leaks in polymorphic containers
Full text PdfPdf (220 KB)
Source International Conference on Software Engineering archive
Proceedings of the 28th international conference on Software engineering table of contents
Shanghai, China
SESSION: Research papers: test & analysis III table of contents
Pages: 252 - 261  
Year of Publication: 2006
ISBN:1-59593-375-1
Authors
David L. Heine  Tensilica, Inc.
Monica S. Lam  Stanford University
Sponsors
ACM: Association for Computing Machinery
SIGSOFT: ACM Special Interest Group on Software Engineering
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 14,   Downloads (12 Months): 59,   Citation Count: 9
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1134285.1134321
What is a DOI?

ABSTRACT

This paper presents the first practical static analysis tool that can find memory leaks and double deletions of objects held in polymorphic containers. This is especially important since most dynamically allocated objects are stored in containers.The tool is based on the concept of object ownership: every object has one and only one owning pointer. The owning pointer holds the exclusive right and obligation to either delete the object or to transfer the obligation. This paper presents a new type system that allows different instances of a polymorphic container to hold different types of elements, and to independently own or not own their elements.Our tool is sound: it will report all potential memory leaks and multiple deletions of pointers in a program. Our system automatically identifies the container implementation routines in an application. The user provides a short specification on the container structure and ownership constraints for these routines. The system then solves for the ownership constraints flow- and context-sensitively, and reports inconsistencies in ownership constraints as potential memory leaks and double deletions.We applied our tool to a suite of five large open-source and commercial C and C++ applications totaling one million lines of code. The tool successfully identified memory leaks in these programs and found double deletions of objects that could lead to program failures or security vulnerabilities.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

1
2
 
3
 
4
 
5
D. Clarke. An object calculus with ownership and containment. In FOOL 2001, January 2001.
6
7
 
8
M. Corporation. CAN-2004-0416. Common Vulnerabilities and Exposures (CVE) (cve.mitre.org), 2004.
9
 
10
11
12
13
14
15
16
17
18
19
 
20
21
22
 
23
 
24
N. Nethercote and J. Seward. Valgrind: A program supervision framework. In Third Workshop on Runtime Verification (RV'03), July 2003.
 
25
26
 
27
 
28
SUIF Group. The SUIF2 compiler system. http://suif.stanford.edu/suif/suif2/+.
 
29
 
30
P. Wadler. Linear types can change the world. In IFIP TC 2 Working Conference on Programming Concepts and Methods, pages 561--581, April 1990.
 
31
 
32
D. A. Wheeler. More than a gigabuck: Estimating gnu/linux's size, June 2001. http://www.dwheeler.com/sloc+.
33

CITED BY  9

Collaborative Colleagues:
David L. Heine: colleagues
Monica S. Lam: colleagues