Pointer Race Freedom

We propose a novel notion of pointer race for concurrent programs manipulating a shared heap. A pointer race is an access to a memory address which was freed, and it is out of the accessor's control whether or not the cell has been re-allocated. We establish two results. 1 Under the assumption of pointer race freedom, it is sound to verify a program running under explicit memory management as if it was running with garbage collection. 2 Even the requirement of pointer race freedom itself can be verified under the garbage-collected semantics. We then prove analogues of the theorems for a stronger notion of pointer race needed to cope with performance-critical code purposely using racy comparisons and even racy dereferences of pointers. As a practical contribution, we apply our results to optimize a thread-modular analysis under explicit memory management. Our experiments confirm a speed-up of upi¾?to two orders of magnitude.

[1]  Mark Moir,et al.  Lock-free reference counting , 2002 .

[2]  Roman Manevich,et al.  Abstract Transformers for Thread Correlation Analysis , 2009, APLAS.

[3]  Mark D. Hill,et al.  A Unified Formalization of Four Shared-Memory Models , 1993, IEEE Trans. Parallel Distributed Syst..

[4]  Viktor Vafeiadis,et al.  RGSep Action Inference , 2010, VMCAI.

[5]  Roland Meyer,et al.  Deciding Robustness against Total Store Ordering , 2011, ICALP.

[6]  Maged M. Michael,et al.  Nonblocking Algorithms and Preemption-Safe Locking on Multiprogrammed Shared Memory Multiprocessors , 1998, J. Parallel Distributed Comput..

[7]  Maged M. Michael Hazard pointers: safe memory reclamation for lock-free objects , 2004, IEEE Transactions on Parallel and Distributed Systems.

[8]  Parosh Aziz Abdulla,et al.  Correction to: An integrated specification and verification technique for highly concurrent data structures , 2013, TACAS.

[9]  Hongseok Yang,et al.  Data Refinement with Low-Level Pointer Operations , 2005, APLAS.

[10]  Alexey Gotsman,et al.  Thread-modular shape analysis , 2007, PLDI '07.

[11]  L ScottMichael,et al.  Nonblocking Algorithms and Preemption-Safe Locking on Multiprogrammed Shared Memory Multiprocessors , 1998 .

[12]  Jade Alglave,et al.  Stability in Weak Memory Models , 2011, CAV.

[13]  Hongseok Yang,et al.  Verifying Concurrent Memory Reclamation Algorithms with Grace , 2013, ESOP.

[14]  Scott Owens,et al.  Reasoning about the Implementation of Concurrency Abstractions on x86-TSO , 2010, ECOOP.

[15]  Cormac Flanagan,et al.  Thread-Modular Model Checking , 2003, SPIN.

[16]  Viktor Vafeiadis,et al.  Shape-Value Abstraction for Verifying Linearizability , 2008, VMCAI.