Efficient detection of all pointer and array access errors

We present a pointer and array access checking technique that provides complete error coverage through a simple set of program transformations. Our technique, based on an extended safe pointer representation, has a number of novel aspects. Foremost, it is the first technique that detects all spatial and temporal access errors. Its use is not limited by the expressiveness of the language; that is, it can be applied successfully to compiled or interpreted languages with subscripted and mutable pointers, local references, and explicit and typeless dynamic storage management, e.g., C. Because it is a source level transformation, it is amenable to both compile- and run-time optimization. Finally, its performance, even without compile-time optimization, is quite good. We implemented a prototype translator for the C language and analyzed the checking overheads of six non-trivial, pointer intensive programs. Execution overheads range from 130% to 540%; with text and data size overheads typically below 100%.

[1]  Mark Sullivan,et al.  Software defects and their impact on system availability-a study of field failures in operating systems , 1991, [1991] Digest of Papers. Fault-Tolerant Computing: The Twenty-First International Symposium.

[2]  Daniel R. Edelson Smart Pointers: They're Smart, But They're Not Pointers , 1992, C++ Conference.

[3]  Joseph L. Steffen Adding run‐time checking to the portable C compiler , 1992, Softw. Pract. Exp..

[4]  J. Boehm Space Eecient Conservative Garbage Collection , 1993 .

[5]  John R. Ellis,et al.  Safe, Efficient Garbage Collection for C++ , 1994, C++ Conference.

[6]  Hans-Juergen Boehm,et al.  Garbage collection in an uncooperative environment , 1988, Softw. Pract. Exp..

[7]  James R. Larus,et al.  Efficient program tracing , 1993, Computer.

[8]  Charles N. Fischer,et al.  The Implementation of Run-Time Diagnostics in Pascal , 1980, IEEE Transactions on Software Engineering.

[9]  Bowen Alpern,et al.  Detecting equality of variables in programs , 1988, POPL '88.

[10]  Barton P. Miller,et al.  An empirical study of the reliability of UNIX utilities , 1990, Commun. ACM.

[11]  William H. Harrison,et al.  Compiler Analysis of the Value Ranges for Variables , 1977, IEEE Transactions on Software Engineering.

[12]  Peter Lee,et al.  Topics in advanced language implementation , 1991 .

[13]  Peter G. Harrison,et al.  Functional Programming , 1988 .

[14]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[15]  Rajiv Gupta A fresh look at optimizing array bound checking , 1990, PLDI '90.

[16]  Robert O. Hastings,et al.  Fast detection of memory leaks and access errors , 1991 .

[17]  M. Wegman,et al.  Global value numbers and redundant computations , 1988, POPL '88.

[18]  Ben Zorn,et al.  A memory allocation profiler for c and lisp , 1988 .

[19]  Johnathan M. Asuru Optimization of array subscript range checks , 1992, LOPL.

[20]  Graham Ross,et al.  Integral-C—a practical environment for C programming , 1987, SDE 2.

[21]  BoehmHans-Juergen Space efficient conservative garbage collection , 1993 .

[22]  Andrew Ginter DESIGN ALTERNATIVES FOR A COOPERATIVE GARBAGE COLLECTOR FOR THE C++ PROGRAMMING LANGUAGE , 1991 .