Memory safety without runtime checks or garbage collection

Dinakar Dhurjati, Sumant Kowshik, Vikram Adve, Chris Lattner

Research output: Contribution to conferencePaper

Abstract

Traditional approaches to enforcing memory safety of programs rely heavily on runtime checks of memory accesses and on garbage collection, both of which are unattractive for embedded applications. The long-term goal of our work is to enable 100% static enforcement of memory safety for embedded programs through advanced compiler techniques and minimal semantic restrictions on programs. The key result of this paper is a compiler technique that ensures memory safety of dynamically allocated memory without programmer annotations, runtime checks, or garbage collection, and works for a large subclass of type-safe C programs. The technique is based on a fully automatic pool allocation (i.e., region-inference) algorithm for C programs we developed previously, and it ensures safety of dynamically allocated memory while retaining explicit deallocation of individual objects within regions (to avoid garbage collection). For a diverse set of embedded C programs (and using a previous technique to avoid null pointer checks), we show that we are able to statically ensure the safety of pointer and dynamic memory usage in all these programs. We also describe some improvements over our previous work in static checking of array accesses. Overall, we achieve 100% static enforcement of memory safety without new language syntax for a significant subclass of embedded C programs, and the subclass is much broader if array bounds checks are ignored.

Original languageEnglish (US)
Pages69-80
Number of pages12
StatePublished - Nov 19 2003
EventProceedings of the 2003 ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems - San Diego, CA, United States
Duration: Jun 11 2003Jun 13 2003

Conference

ConferenceProceedings of the 2003 ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems
CountryUnited States
CitySan Diego, CA
Period6/11/036/13/03

Fingerprint

Data storage equipment
Semantics

Keywords

  • Automatic pool allocation
  • Compilers
  • Embedded systems
  • Programming languages
  • Region management
  • Security
  • Static analysis

ASJC Scopus subject areas

  • Software

Cite this

Dhurjati, D., Kowshik, S., Adve, V., & Lattner, C. (2003). Memory safety without runtime checks or garbage collection. 69-80. Paper presented at Proceedings of the 2003 ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems, San Diego, CA, United States.

Memory safety without runtime checks or garbage collection. / Dhurjati, Dinakar; Kowshik, Sumant; Adve, Vikram; Lattner, Chris.

2003. 69-80 Paper presented at Proceedings of the 2003 ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems, San Diego, CA, United States.

Research output: Contribution to conferencePaper

Dhurjati, D, Kowshik, S, Adve, V & Lattner, C 2003, 'Memory safety without runtime checks or garbage collection' Paper presented at Proceedings of the 2003 ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems, San Diego, CA, United States, 6/11/03 - 6/13/03, pp. 69-80.
Dhurjati D, Kowshik S, Adve V, Lattner C. Memory safety without runtime checks or garbage collection. 2003. Paper presented at Proceedings of the 2003 ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems, San Diego, CA, United States.
Dhurjati, Dinakar ; Kowshik, Sumant ; Adve, Vikram ; Lattner, Chris. / Memory safety without runtime checks or garbage collection. Paper presented at Proceedings of the 2003 ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems, San Diego, CA, United States.12 p.
@conference{9230976bb06745b1b24e6a3b7e644068,
title = "Memory safety without runtime checks or garbage collection",
abstract = "Traditional approaches to enforcing memory safety of programs rely heavily on runtime checks of memory accesses and on garbage collection, both of which are unattractive for embedded applications. The long-term goal of our work is to enable 100{\%} static enforcement of memory safety for embedded programs through advanced compiler techniques and minimal semantic restrictions on programs. The key result of this paper is a compiler technique that ensures memory safety of dynamically allocated memory without programmer annotations, runtime checks, or garbage collection, and works for a large subclass of type-safe C programs. The technique is based on a fully automatic pool allocation (i.e., region-inference) algorithm for C programs we developed previously, and it ensures safety of dynamically allocated memory while retaining explicit deallocation of individual objects within regions (to avoid garbage collection). For a diverse set of embedded C programs (and using a previous technique to avoid null pointer checks), we show that we are able to statically ensure the safety of pointer and dynamic memory usage in all these programs. We also describe some improvements over our previous work in static checking of array accesses. Overall, we achieve 100{\%} static enforcement of memory safety without new language syntax for a significant subclass of embedded C programs, and the subclass is much broader if array bounds checks are ignored.",
keywords = "Automatic pool allocation, Compilers, Embedded systems, Programming languages, Region management, Security, Static analysis",
author = "Dinakar Dhurjati and Sumant Kowshik and Vikram Adve and Chris Lattner",
year = "2003",
month = "11",
day = "19",
language = "English (US)",
pages = "69--80",
note = "Proceedings of the 2003 ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems ; Conference date: 11-06-2003 Through 13-06-2003",

}

TY - CONF

T1 - Memory safety without runtime checks or garbage collection

AU - Dhurjati, Dinakar

AU - Kowshik, Sumant

AU - Adve, Vikram

AU - Lattner, Chris

PY - 2003/11/19

Y1 - 2003/11/19

N2 - Traditional approaches to enforcing memory safety of programs rely heavily on runtime checks of memory accesses and on garbage collection, both of which are unattractive for embedded applications. The long-term goal of our work is to enable 100% static enforcement of memory safety for embedded programs through advanced compiler techniques and minimal semantic restrictions on programs. The key result of this paper is a compiler technique that ensures memory safety of dynamically allocated memory without programmer annotations, runtime checks, or garbage collection, and works for a large subclass of type-safe C programs. The technique is based on a fully automatic pool allocation (i.e., region-inference) algorithm for C programs we developed previously, and it ensures safety of dynamically allocated memory while retaining explicit deallocation of individual objects within regions (to avoid garbage collection). For a diverse set of embedded C programs (and using a previous technique to avoid null pointer checks), we show that we are able to statically ensure the safety of pointer and dynamic memory usage in all these programs. We also describe some improvements over our previous work in static checking of array accesses. Overall, we achieve 100% static enforcement of memory safety without new language syntax for a significant subclass of embedded C programs, and the subclass is much broader if array bounds checks are ignored.

AB - Traditional approaches to enforcing memory safety of programs rely heavily on runtime checks of memory accesses and on garbage collection, both of which are unattractive for embedded applications. The long-term goal of our work is to enable 100% static enforcement of memory safety for embedded programs through advanced compiler techniques and minimal semantic restrictions on programs. The key result of this paper is a compiler technique that ensures memory safety of dynamically allocated memory without programmer annotations, runtime checks, or garbage collection, and works for a large subclass of type-safe C programs. The technique is based on a fully automatic pool allocation (i.e., region-inference) algorithm for C programs we developed previously, and it ensures safety of dynamically allocated memory while retaining explicit deallocation of individual objects within regions (to avoid garbage collection). For a diverse set of embedded C programs (and using a previous technique to avoid null pointer checks), we show that we are able to statically ensure the safety of pointer and dynamic memory usage in all these programs. We also describe some improvements over our previous work in static checking of array accesses. Overall, we achieve 100% static enforcement of memory safety without new language syntax for a significant subclass of embedded C programs, and the subclass is much broader if array bounds checks are ignored.

KW - Automatic pool allocation

KW - Compilers

KW - Embedded systems

KW - Programming languages

KW - Region management

KW - Security

KW - Static analysis

UR - http://www.scopus.com/inward/record.url?scp=0242612097&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=0242612097&partnerID=8YFLogxK

M3 - Paper

AN - SCOPUS:0242612097

SP - 69

EP - 80

ER -