Runtime Enforcement of Memory Safety for the C Programming Language

dc.contributor.advisorBarua, Rajeeven_US
dc.contributor.authorSimpson, Matthew Stephenen_US
dc.contributor.departmentElectrical Engineeringen_US
dc.contributor.publisherDigital Repository at the University of Marylanden_US
dc.contributor.publisherUniversity of Maryland (College Park, Md.)en_US
dc.date.accessioned2011-07-06T05:47:13Z
dc.date.available2011-07-06T05:47:13Z
dc.date.issued2011en_US
dc.description.abstractMemory access violations are a leading source of unreliability in C programs. Although the low-level features of the C programming language, like unchecked pointer arithmetic and explicit memory management, make it a desirable language for many programming tasks, their use often results in hard-to-detect memory errors. As evidence of this problem, a variety of methods exist for retrofitting C with software checks to detect memory errors at runtime. However, these techniques generally suffer from one or more practical drawbacks that have thus far limited their adoption. These weaknesses include the inability to detect all spatial and temporal violations, the use of incompatible metadata, the need for manual code modifications, and the tremendous runtime cost of providing complete safety. This dissertation introduces MemSafe, a compiler analysis and transformation for ensuring the memory safety of C programs at runtime while avoiding the above drawbacks. MemSafe makes several novel contributions that improve upon previous work and lower the runtime cost of achieving memory safety. These include (1) a method for modeling temporal errors as spatial errors, (2) a hybrid metadata representation that combines the most salient features of both object- and pointer-based approaches, and (3) a data-flow representation that simplifies optimizations for removing unneeded checks and unused metadata. Experimental results indicate that MemSafe is capable of detecting memory safety violations in real-world programs with lower runtime overhead than previous methods. Results show that MemSafe detects all known memory errors in multiple versions of two large and widely-used open source applications as well as six programs from a benchmark suite specifically designed for the evaluation of error detection tools. MemSafe enforces complete safety with an average overhead of 88% on 30 widely-used performance evaluation benchmarks. In comparison with previous work, MemSafe's average runtime overhead for one common benchmark suite (29%) is a fraction of that associated with the previous technique (133%) that, until now, had the lowest overhead among all existing complete and automatic methods that are capable of detecting both spatial and temporal violations.en_US
dc.identifier.urihttp://hdl.handle.net/1903/11495
dc.subject.pqcontrolledComputer Engineeringen_US
dc.subject.pqcontrolledComputer Scienceen_US
dc.subject.pquncontrolledCompilersen_US
dc.subject.pquncontrolledMemory Safetyen_US
dc.subject.pquncontrolledProgramming Languagesen_US
dc.subject.pquncontrolledReliabilityen_US
dc.subject.pquncontrolledSecurityen_US
dc.titleRuntime Enforcement of Memory Safety for the C Programming Languageen_US
dc.typeDissertationen_US

Files

Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
Simpson_umd_0117E_11974.pdf
Size:
1.33 MB
Format:
Adobe Portable Document Format