Peng Liu, Omer Tripp, and Xiangyu Zhang

Predictive analysis, recently proposed for race detection, guarantees to report no false positives and achieves good coverage. Predictive analysis starts with the trace of an execution and mutates the schedule order of the trace to “predict” the executions that expose the hidden races.

Ideally, the predictive analysis should allow the schedule mutation to change the memory location accessed by the field access, which helps meet the “same memory location” requirement of the data race. However, existing predictive approaches, including causality-preserving approaches and symbolic approaches, lack of the capability.

We propose the first predictive analysis that allows changing the accessed locations. The key challenge is that the modeling of the field accesses relies on the location, which may however be changed as unknown by the schedule mutation. We solve the challenge through a novel combination of the predictive analysis and the pointer analysis. Besides, different from the previous work, our analysis applies a hybrid encoding scheme to account for the practical applicability.

We have implemented our approach as IPA and compared it against the most recent predictive analysis over a set of popular Java applications. The evaluation confirms the effectiveness of our approach: IPA is able to find approximately 2X more races.