DocumentCode :
2569778
Title :
MemSafe: Ensuring the Spatial and Temporal Memory Safety of C at Runtime
Author :
Simpson, Matthew S. ; Barua, Rajeev K.
Author_Institution :
Dept. of Electr. & Comput. Eng., Univ. of Maryland Coll. Park, College Park, MD, USA
fYear :
2010
fDate :
12-13 Sept. 2010
Firstpage :
199
Lastpage :
208
Abstract :
Memory access violations are a leading source of unreliability in C programs. As evidence of this problem, a variety of methods exist that retrofit C with software checks to detect memory errors at runtime. However, these methods generally suffer from one or more drawbacks including the inability to detect all errors, the use of incompatible metadata, the need for manual code modifications, and high runtime overheads. In this paper, we present a compiler analysis and transformation for ensuring the memory safety of C called MemSafe. MemSafe makes several novel contributions that improve upon previous work and lower the cost of safety. These include (1) a method for modeling temporal errors as spatial errors, (2) a metadata representation that combines features of both object - and pointer-based approaches, and (3) a dataflow representation that simplifies optimizations for removing unneeded checks. MemSafe is capable of detecting real errors with lower overheads than previous efforts. Experimental results show that MemSafe detects all memory errors in 6 programs with known violations and ensures complete safety with an average overhead of 87% on 30 large programs widely-used in evaluating error detection tools.
Keywords :
C language; meta data; C programs; MemSafe; manual code modifications; memory access violations; memory error detection; metadata representation; spatial memory safety; temporal memory safety; Arrays; Databases; Memory management; Resource management; Runtime; Safety; Software; C; Languages; Memory Safety; Reliability; Verification;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Source Code Analysis and Manipulation (SCAM), 2010 10th IEEE Working Conference on
Conference_Location :
Timisoara
Print_ISBN :
978-1-4244-8655-7
Type :
conf
DOI :
10.1109/SCAM.2010.15
Filename :
5601849
Link To Document :
بازگشت