Journal of Hebei University of Science and Technology (Oct 2020)

A context-sensitive approach to data race detection

  • Yang ZHANG,
  • Huan LIU,
  • Dongwen ZHANG

DOI
https://doi.org/10.7535/hbkd.2020yx05005
Journal volume & issue
Vol. 41, no. 5
pp. 416 – 423

Abstract

Read online

To improve the correctness of data race detection, an approach to the data race detection based on the context-sensitive analysis in multithreaded programs was proposed. Firstly, control flow analysis was used to construct context-sensitive call graphs, and then escape analysis was employed to find thread-escaped objects that may cause data race. Secondly, context-sensitive alias analysis was conducted to reduce false positives and false negatives. Finally, the happens-before analysis was performed to remove false positives caused by ignoring thread interactions. A data race detection tool ConRacer was implemented in WALA framework based on this approach and was compared with the existing tools SRD and RVPredict. The experimental results show that ConRacer is the most precise tool compared with SRD and RVPredict and it can not only detect data races, but also reduce false positives and false negatives effectively. ConRacer improves the detection accuracy by combining context-sensitive with static detection methods, which has certain reference value for discovering concurrent errors and optimizing software performance.

Keywords