Safe Low-Level Languages

نویسنده

  • Justin Slepak
چکیده

Two hazards commonly associated with manual memory management are allocating a block of memory without ever freeing it (memory leak) and attempting to access a block of memory which has already been freed (dangling pointer access). Tofte and Talpin described a “region type” system, in which data in the store is associated with a named region. The expression (e at ⇢) allocates store space for the result of e in the region ⇢. (letregion ⇢ in e) allocates a new region named ⇢, which remains in scope in e. Once the body of the letregion expression is evaluated, all store objects in the region it created are freed. This means regions are managed in stack-based manner. A region allocated for the entire program can be treated as a heap, but data remains in this heap until program termination as the only way to deallocate a store entry is for its region to go out of scope. Including a tag identifying the regions a function may access in the function’s type allows checking that function calls do not access regions which have already been freed. Cyclone o↵ers this region-based memory management in a C-like language. Every pointer type includes a region annotation. Each function automatically introduce a new region, which is freed when the function returns. The programmer can also wrap a block of code (within a function) with a region declaration, giving slightly finer control over memory allocation. There is also a “heap” region which is always in scope and is garbage-collected. “Region polymorphism” allows variables in a the region tag of a function or struct. For example strcpy can be used on arguments from arbitrary regions, and those regions are the ones strcpy will access: char?⇢ strcpy<⇢, ⇢2>(char?⇢ d, const char?⇢2 s).

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Towards the Safe Programming of Wireless Sensor Networks

Sensor networks are rather challenging to deploy, program, and debug. Current programming languages for these platforms suffer from a significant semantic gap between their specifications and underlying implementations. This fact precludes the development of (type-)safe applications, which would potentially simplify the task of programming and debugging deployed networks. In this paper we defin...

متن کامل

Formally Secure Compilation

Severe low-level vulnerabilities abound in today’s computer systems, allowing cyber-attackers to remotely gain full control. This happens in big part because our programming languages, compilers, and architectures were designed in an era of scarce hardware resources and too often trade off security for efficiency. The semantics of mainstream low-level languages like C is inherently insecure, an...

متن کامل

Formally Secure Compilation

Severe low-level vulnerabilities abound in today’s computer systems, allowing cyber-attackers to remotely gain full control. This happens in big part because our programming languages, compilers, and architectures were designed in an era of scarce hardware resources and too often trade off security for efficiency. The semantics of mainstream low-level languages like C is inherently insecure, an...

متن کامل

Formally Secure Compilation

Severe low-level vulnerabilities abound in today’s computer systems, allowing cyber-attackers to remotely gain full control. This happens in big part because our programming languages, compilers, and architectures were designed in an era of scarce hardware resources and too often trade off security for efficiency. The semantics of mainstream low-level languages like C is inherently insecure, an...

متن کامل

Formally Secure Compilation

Severe low-level vulnerabilities abound in today’s computer systems, allowing cyber-attackers to remotely gain full control. This happens in big part because our programming languages, compilers, and architectures were designed in an era of scarce hardware resources and too often trade off security for efficiency. The semantics of mainstream low-level languages like C is inherently insecure, an...

متن کامل

Formally Secure Compilation

Severe low-level vulnerabilities abound in today’s computer systems, allowing cyber-attackers to remotely gain full control. This happens in big part because our programming languages, compilers, and architectures were designed in an era of scarce hardware resources and too often trade off security for efficiency. The semantics of mainstream low-level languages like C is inherently insecure, an...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012