Share on Facebook Tweet on Twitter Share on LinkedIn Share by email
Dynamically Checking Ownership Policies in Concurrent C/C++ Programs

Speaker  Miguel Castro

Affiliation  MSRC

Host  Chris Gould-Sandhu

Duration  00:44:09

Date recorded  1 June 2012

Concurrent programming errors arise when threads share data incorrectly. Programmers often avoid these errors by using synchronization to enforce a simple ownership policy: data is either owned exclusively by a thread that can read or write the data, or it is read owned by a set of threads that can read but not write the data. Unfortunately, incorrect synchronization often fails to enforce these policies and memory errors in languages like C and C++ can violate these policies even when synchronization is correct. In this paper, we present a dynamic analysis for checking ownership policies in concurrent C and C++ programs despite memory errors. The analysis can be used to find errors in commodity multi-threaded programs and to prevent attacks that exploit these errors. We require programmers to write ownership assertions that describe the sharing policies used by different parts of the program. These policies may change over time, as may the policies’ means of enforcement, whether it be locks, barriers, thread joins, etc. Our compiler inserts checks in the program that signal an error if these policies are violated at runtime. We evaluated our tool on several benchmark programs.

©2012 Microsoft Corporation. All rights reserved.
By the same speaker
People also watched
> Dynamically Checking Ownership Policies in Concurrent C/C++ Programs