New MHP analysis improves precision in concurrency bug detection in C programs, indicating benefits for Pthreads operations.
May‐Happen‐in‐Parallel (MHP) analysis serves as the basis for many concurrency bugs analyses. Inadequate handling of the coupling between locks and thread creation statements, as well as inter‐procedural locks, can lead to a loss of precision in MHP analysis. To address these issues, this paper proposes a new MHP analysis for C that operates at the segment granularity rather than individual statements. By constructing a Segmented Thread‐sensitive Control Flow Graph (STCFG) for a program, statements are grouped into different segments. Context information is added to these segments to capture the semantics of Pthreads operations, thereby identifying Happens‐Before (HB) and conflict relationships between segments. To compute MHP information for statement pairs, it is sufficient to examine the relationship between segments to infer the relationship between statements. We implement our algorithm in LLVM and evaluate it using eight test cases as well as four programs from the SPLASH2 benchmark suite. Preliminary results show that our method provides higher precision and achieves higher efficiency.
No takes yet. Share an insight, caveat, or question.
Lu et al. (2025) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: