icon-carat-right menu search cmu-wordmark

Performance of Compiler-Assisted Memory Safety Checking

Technical Note
This technical note describes the criteria for deploying a compiler-based memory safety checking tool and the performance that can be achieved with two such tools whose source code is freely available.
Publisher

Software Engineering Institute

CMU/SEI Report Number
CMU/SEI-2014-TN-014
DOI (Digital Object Identifier)
10.1184/R1/6581987.v1

Abstract

Buffer overflows affect a large installed base of C code. This technical note describes the criteria for deploying a compiler-based memory safety checking tool and the performance that can be achieved with two such tools whose source code is freely available. The note then describes a modification to the LLVM compiler to enable hoisting bounds checks from loops and functions. This proof-of-concept prototype has been used to demonstrate how these optimizations can be performed reliably on bounds checks to improve their performance. However, the performance of bounds propagation is the dominant cost, and the overall runtime cost for bounds checking for C remains expensive, even after these optimizations are applied. Nevertheless, optimized bounds checks are adequate for non-performance-critical applications, and improvements in processor technology may allow optimized bounds checking to be used with performance-critical applications.

Cite This Technical Note

Keaton, D., & Seacord, R. (2014, July 31). Performance of Compiler-Assisted Memory Safety Checking. (Technical Note CMU/SEI-2014-TN-014). Retrieved December 3, 2024, from https://doi.org/10.1184/R1/6581987.v1.

@techreport{keaton_2014,
author={Keaton, David and Seacord, Robert},
title={Performance of Compiler-Assisted Memory Safety Checking},
month={{Jul},
year={{2014},
number={{CMU/SEI-2014-TN-014},
howpublished={Carnegie Mellon University, Software Engineering Institute's Digital Library},
url={https://doi.org/10.1184/R1/6581987.v1},
note={Accessed: 2024-Dec-3}
}

Keaton, David, and Robert Seacord. "Performance of Compiler-Assisted Memory Safety Checking." (CMU/SEI-2014-TN-014). Carnegie Mellon University, Software Engineering Institute's Digital Library. Software Engineering Institute, July 31, 2014. https://doi.org/10.1184/R1/6581987.v1.

D. Keaton, and R. Seacord, "Performance of Compiler-Assisted Memory Safety Checking," Carnegie Mellon University, Software Engineering Institute's Digital Library. Software Engineering Institute, Technical Note CMU/SEI-2014-TN-014, 31-Jul-2014 [Online]. Available: https://doi.org/10.1184/R1/6581987.v1. [Accessed: 3-Dec-2024].

Keaton, David, and Robert Seacord. "Performance of Compiler-Assisted Memory Safety Checking." (Technical Note CMU/SEI-2014-TN-014). Carnegie Mellon University, Software Engineering Institute's Digital Library, Software Engineering Institute, 31 Jul. 2014. https://doi.org/10.1184/R1/6581987.v1. Accessed 3 Dec. 2024.

Keaton, David; & Seacord, Robert. Performance of Compiler-Assisted Memory Safety Checking. CMU/SEI-2014-TN-014. Software Engineering Institute. 2014. https://doi.org/10.1184/R1/6581987.v1