|
ABSTRACT
We present a novel, table-free technique for detecting all temporal and spatial memory access errors (e.g. dangling pointers, out-of-bounds check, etc.) in programs supporting general pointers. Our approach is the first technique to provide such error checking using only constant-time operations. The scheme relies on fat pointers, whose size is contained within standard scalar sizes (up to two words) so that atomic hardware support for operations upon the pointers is obtained along with meaningful casts in-between pointers and other scalars. Optimized compilation of code becomes possible since the scalarized-for-free encoded pointers get register allocated and manipulated. Backward compatibility is enabled by the scalar pointer sizes, with novel automatic support provided for encoding and decoding of fat pointers in place for interaction with unprotected code (e.g. library binaries). Implementation and benchmarks of the technique over several applications of the memory-intensive Olden suite indicate that the average time overhead of our method is about half the time cost of an unprotected application's execution (< 55%). This performance is over twice faster than the nearest prior work.
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
|
Austin, T. M., Breach, S. E., and Sohi, G. S. 1994. Efficient detection of all pointer and array access errors. In Proc. ACM SIGPLAN 1994 Conf. Programming Language Design and Implementation (Orlando, Florida, United States, June 20 - 24, 1994). PLDI '94. ACM, New York, NY, 290--301. DOI=http://doi.acm.org/10.1145/178243.178446.
|
| |
2
|
Berger, E. D. and Zorn, B. G. 2006. DieHard: probabilistic memory safety for unsafe languages. In Proc. ACM SIGPLAN 2006 Conf. Prog. Language Design and Implementation,, SIGPLAN Not. 41, 6 (Jun. 2006), 158--168. DOI=http://doi.acm.org/10.1145/1133981.1134000.
|
| |
3
|
Boehm, H. 1993. Space efficient conservative garbage collection. In Proc. ACM SIGPLAN 1993 Conf. Prog. Language Design and Implementation (Albuquerque, New Mexico, United States, June 21 - 25, 1993). R. Cartwright, Ed. PLDI '93. ACM, New York, NY, 197--206. DOI=http://doi.acm.org/10.1145/155090.155109.
|
| |
4
|
ISO/IEC 9899:1999 C standard, 1999. ISO/IEC 14882:1998 C++ standard, 1998. Also, ISO/IEC 9899: 1999 C Technical Corrigendum, 2001, www.iso.org.
|
| |
5
|
Chilimbi, T. M. and Hauswirth, M. 2004. Low-overhead memory leak detection using adaptive statistical profiling. In ASPLOS 2004, SIGPLAN Not. 39, 11 (Nov. 2004), 156--164. DOI=http://doi.acm.org/10.1145/1037187.1024412.
|
| |
6
|
Condit, J., Harren, M., McPeak, S., Necula, G. C., and Weimer, W. 2003. CCured in the real world. In Proc. ACM SIGPLAN 2003 Conf. on Programming Language Design and Implementation (San Diego, California, USA, June 09 - 11, 2003). PLDI '03. ACM, New York, NY, 232--244. DOI=http://doi.acm.org/10.1145/781131.781157.
|
| |
7
|
Dhurjati, D. and Adve, V. 2006. Backwards-compatible array bounds checking for C with very low overhead. In Proc. 28th Int. Conf. Software Engineering (Shanghai, China, May 20 - 28, 2006). ICSE '06. ACM, New York, NY, 162--171. DOI=http://doi.acm.org/10.1145/1134285.1134309.
|
| |
8
|
Dhurjati, D. and Adve, V. 2006. Efficiently Detecting All Dangling Pointer Uses in Production Servers. In Proc. Int. Conf. Dependable Systems and Networks (June, '06). DSN '06. IEEE Computer Society, Washington, DC, 269--280.
|
| |
9
|
Dhurjati, D., Kowshik, S., and Adve, V. 2006. SAFECode: enforcing alias analysis for weakly typed languages. In Proc. ACM SIGPLAN 2006 Conf. Prog. Language Design and Implementation, SIGPLAN Not. 41, 6 (Jun. 2006), 144--157. DOI=http://doi.acm.org/10.1145/1133255.1133999.
|
| |
10
|
R. Hastings and B. Joyce. Purify: Fast detection of memory leaks and access errors. In Proc. Usenix Winter 1992 Technical Conference (San Francisco, CA, USA, Jan. 1992). Usenix Association, 125--136.
|
| |
11
|
Jim, T., Morrisett, J. G., Grossman, D., Hicks, M. W., Cheney, J., and Wang, Y. 2002. Cyclone: A Safe Dialect of C. In Proceedings of the General Track: 2002 USENIX Annual Technical Conference (June 10 - 15, 2002). C. S. Ellis, Ed. USENIX Association, Berkeley, CA, 275--288.
|
| |
12
|
R. W. M. Jones and P. H. J. Kelly. Backwards-compatible bounds checking for arrays and pointers in C programs. In Automated and Algorithmic Debugging, Linkoping, Sweden, pages 13--26, 1997.
|
| |
13
|
Loginov, A., Yong, S. H., Horwitz, S., and Reps, T. W. 2001. Debugging via Run-Time Type Checking. In Proc. 4th International Conf. Fundamental Approaches To Software Engineering (April 02 - 06, 2001). H. Hußmann, Ed. LNCS vol. 2029. Springer--Verlag, London, 217--232.
|
| |
14
|
Necula, G. C., McPeak, S., and Weimer, W. 2002. CCured: type-safe retrofitting of legacy code. In Proc. 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Portland, Oregon, January 16 - 18, 2002). POPL '02. ACM, New York, NY, 128--139. DOI= http://doi.acm.org/10.1145/503272.503286.
|
| |
15
|
Nethercote, N. and Seward, J. 2007. Valgrind: a framework for heavyweight dynamic binary instrumentation. In Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation (June 2007). PLDI '07. ACM, New York, NY, 89--100. DOI= http://doi.acm.org/10.1145/1273442.1250746.
|
| |
16
|
Oiwa, Y. Implementation of a Fail-Safe ANSI C Compiler. PhD Thesis, Department of Computer Science, University of Tokyo, December 2004.
|
| |
17
|
Qin, F., Lu, S., and Zhou, Y. 2005. SafeMem: Exploiting ECC-Memory for Detecting Memory Leaks and Memory Corruption During Production Runs. In Proc. HPCA (February 12 - 16, 2005). IEEE Computer Society, Washington, DC, 291--302.
|
| |
18
|
Ruwase, O. and Lam, M. 2004. A practical dynamic buffer overflow detector. In Proc. Network and Distributed System Security (NDSS) Symposium. February 2004, 159--169.
|
| |
19
|
Seward, J. and Nethercote, N. 2005. Using Valgrind to detect undefined value errors with bit-precision. In Proc. USENIX Annual Technical Conference (Anaheim, CA, April 2005). USENIX '05. USENIX Association, Berkeley, CA.
|
| |
20
|
Varma, P. "Generalizing Recognition of an Individual Dialect in Program Analysis and Transformation", In Proc. ACM Symp. Applied Computing (SAC 2007) (Seoul, Korea, March 11-15, '07) ACM Press, New York. 1432--1439. DOI=http://doi.acm.org/10.1145/1244002.1244310.
|
| |
21
|
Varma, P. Anand, A., Pazel, D. P., Tibbitts, B. R. "NextGen EXtreme Porting: Structured by Automation", In Proc. ACM Symp. Applied Computing (SAC 2005) (Santa Fe, NM, USA, March '05) ACM Press, New York. 1511--1517. DOI=http://doi.acm.org/10.1145/1066677.1067018.
|
| |
22
|
Xu, W., DuVarney, D. C., and Sekar, R. 2004. An efficient and backwards-compatible transformation to ensure memory safety of C programs. In Proc. 12th ACM SIGSOFT Int. Symposium on Foundations of Software Engineering (Newport Beach, CA, USA, October 31 - November 06, 2004). SIGSOFT '04/FSE-12. ACM, New York, NY, 117--126. DOI= http://doi.acm.org/10.1145/1029894.1029913.
|
|