A fast and precise analysis for data race detection

When two threads access the shared memory without being synchronized, and at least one performs a write operation, they form a data race. Data races are widely considered the symptom of bugs in multithreaded programs, and a huge amount of work has been done in order to detect them. The key issue in order to statically discover data races via abstract interpretation in Java programs is to develop a specific alias analysis that abstracts references, as (i) the shared memory is the heap, and it is accesses by reference (ii) monitors are defined on objects, and so they are identified by reference. This paper presents a combination of may- and must- alias analyses, in order to capture precise information on accesses and synchronization. Moreover, we provide information on missing locks if a possible data race is detected. The analysis has been implemented and tested. Our approach is based on abstract interpretation theory and it analyzes a subset of Java bytecode.

[1]  Paul Petersen,et al.  Unraveling Data Race Detection in the Intel ® Thread Checker , 2006 .

[2]  Erik Ruf,et al.  Context-insensitive alias analysis reconsidered , 1995, PLDI '95.

[3]  Pietro Ferrara JAIL: Firewall Analysis of Java Card by Abstract Interpretation , 2006 .

[4]  Manuel Fähndrich,et al.  On the Relative Completeness of Bytecode Analysis Versus Source Code Analysis , 2008, CC.

[5]  Alexander Aiken,et al.  Conditional must not aliasing for static race detection , 2007, POPL '07.

[6]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[7]  Assaf Schuster,et al.  Efficient on-the-fly data race detection in multithreaded C++ programs , 2003, PPoPP '03.

[8]  Martín Abadi,et al.  Types for safe locking: Static race detection for Java , 2006, TOPL.

[9]  Arnaud Venet,et al.  Nonuniform Alias Analysis of Recursive Data Structures and Arrays , 2002, SAS.

[10]  Elvira Albert,et al.  Cost Analysis of Java Bytecode , 2007, ESOP.

[11]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[12]  Martin C. Rinard,et al.  Analysis of Multithreaded Programs , 2001, SAS.

[13]  Reinhard Wilhelm,et al.  Parametric shape analysis via 3-valued logic , 1999, POPL '99.

[14]  Madan Musuvathi,et al.  Iterative context bounding for systematic testing of multithreaded programs , 2007, PLDI '07.

[15]  Thomas A. Henzinger,et al.  Race checking by context inference , 2004, PLDI '04.

[16]  John C. Reynolds Toward a Grainless Semantics for Shared-Variable Concurrency , 2004, FSTTCS.

[17]  Pietro Ferrara Static Analysis Via Abstract Interpretation of the Happens-Before Memory Model , 2008, TAP.

[18]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[19]  Alain Deutsch,et al.  Interprocedural may-alias analysis for pointers: beyond k-limiting , 1994, PLDI '94.

[20]  Jorge A. Navas,et al.  An Efficient, Parametric Fixpoint Algorithm for Analysis of Java Bytecode , 2007, Bytecode@ETAPS.

[21]  Sriram Sankaranarayanan,et al.  Fast and Accurate Static Data-Race Detection for Concurrent Programs , 2007, CAV.

[22]  Patrick Cousot,et al.  Systematic design of program analysis frameworks , 1979, POPL.

[23]  Jeremy Manson,et al.  The Java memory model , 2005, POPL '05.

[24]  Suresh Jagannathan,et al.  Single and loving it: must-alias analysis for higher-order languages , 1998, POPL '98.

[25]  Jong-Deok Choi,et al.  Hybrid dynamic data race detection , 2003, PPoPP '03.

[26]  Barton P. Miller,et al.  What are race conditions?: Some issues and formalizations , 1992, LOPL.

[27]  Elvira Albert,et al.  Experiments in Cost Analysis of Java Bytecode , 2007, Electron. Notes Theor. Comput. Sci..