ACM Home Page
Please provide us with feedback. Feedback
CCured: type-safe retrofitting of legacy code
Full text PdfPdf (1.65 MB)
Source Annual Symposium on Principles of Programming Languages archive
Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
Portland, Oregon
Pages: 128 - 139  
Year of Publication: 2002
ISBN:1-58113-450-9
Also published in ...
Authors
George C. Necula  University of California, Berkeley
Scott McPeak  University of California, Berkeley
Westley Weimer  University of California, Berkeley
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 32,   Downloads (12 Months): 124,   Citation Count: 113
Additional Information:

abstract   references   cited by   collaborative colleagues  

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

ABSTRACT

In this paper we propose a scheme that combines type inference and run-time checking to make existing C programs type safe. We describe the CCured type system, which extends that of C by separating pointer types according to their usage. This type system allows both pointers whose usage can be verified statically to be type safe, and pointers whose safety must be checked at run time. We prove a type soundness result and then we present a surprisingly simple type inference algorithm that is able to infer the appropriate pointer kinds for existing C programs.Our experience with the CCured system shows that the inference is very effective for many C programs, as it is able to infer that most or all of the pointers are statically verifiable to be type safe. The remaining pointers are instrumented with efficient run-time checks to ensure that they are used safely. The resulting performance loss due to run-time checks is 0-150%, which is several times better than comparable approaches that use only dynamic checking. Using CCured we have discovered programming bugs in established C programs such as several SPECINT95 benchmarks.


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
L. Cardelli, J. Donahue, L. Glassman, M. Jordan, B. Kalsow, and G. Nelson. Modula3 report, 1989.
 
6
7
8
9
 
10
R. Hastings and B. Joyce. Purify: Fast detection of memory leaks and access errors. In Proceedings of the Usenix Winter 1992 Technical Conference, pages 125 138, Berkeley, CA, USA, Jan. 1991. Usenix Association.
11
 
12
 
13
R. W. M. Jones and P. III. J. Kelly. Backwards-compatible bounds checking for arrays and pointers in C programs. AADEBUG, 1997.
 
14
S. Kaufer, R. Lopez, and S. Pratap. Saber-C: an interpreterbased programming environment for the C language. In Proceedings of the Summer Usenix Confervnce, pages 161-171, 1988.
 
15
 
16
B. Lampson. A description of the Cedar language. Technical Report CSL-83-15, Xerox Palo Alto Research Center, 1983.
 
17
 
18
 
19
H. Patil and C. N. Fischer. Efficient run-time monitoring using shadow processing. In Automated and Algorithmic Debugging, pages 119-132, 1995.
 
20
21
22
23
24
 
25
 
26
SPEC 95. Standard Performance Evaluation Corportation Benchmarks. http ://www. spee. org/osg/cpu95/UINT95, July 1995.
 
27
28
 
29
D. Wagner, J. Foster, E. Brewer, and A. Aiken. A first step toward automated detection of buffer overrun vulnerabilities. In Network Distributed Systems Security Symposium, pages 1-15, Feb. 2000.
30

CITED BY  113
Collaborative Colleagues:
George C. Necula: colleagues
Scott McPeak: colleagues
Westley Weimer: colleagues