Effective Program Verification for Relaxed Memory Models

Sebastian Burckhardt and Madanlal Musuvathi

Abstract

Program verification for relaxed memory models is challenging. The additional nondeterminism introduced by the memory model relaxation makes existing verification methods ineffective. This paper proposes a new verification technique for the most common memory model relaxation, store buffers. Crucial to this technique is the observation that all programmers, including those who use low-lock techniques for performance, expect their programs to be sequentially consistent. We first present a monitor algorithm that can detect the presence of program executions that are not sequentially consistent (due to store buffers) while only exploring sequentially consistent executions. Then, we combine this monitor with a stateless model checker that verifies that every sequentially consistent execution is correct. We have implemented this algorithm in a prototype tool called SoBeR and present experiments that demonstrate the precision and scalability of our method. We find relaxed memory model bugs in several programs, including a previously unknown bug in a production-level concurrency library that would have been difficult to find by other means.

Details

Publication typeTechReport
NumberMSR-TR-2008-12
Pages16
InstitutionMicrosoft Research

Previous versions

S. Burckhardt and M. Musuvathi. Effective Program Verification for Relaxed Memory Models, Springer Verlag, July 2008.

Sebastian Burckhardt and Madanlal Musuvathi. Effective Program Verification for Relaxed Memory Models, January 2008.

> Publications > Effective Program Verification for Relaxed Memory Models