paperbot · PL 论文追踪

全部论文 待读 收藏

P2 PFix: fixing concurrency bugs based on memory access patterns

PFix:基于内存访问模式修复并发缺陷
ASE Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering2018匹配度 2/10 · 该论文研究传统程序分析与自动修复,聚焦Java并发缺陷修复,虽涉及程序分析但未与LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心方向交叉,与用户关注的PL与AI结合点无直接关联。引用 22 inbox
Huarui Lin, Zan Wang, Shuang Liu, Jun Sun, Dongdi Zhang, Guangning Wei
crossref: 2026-09-12

AI 速览

一句话:从失败相关的内存访问模式推断锁策略,自动修复 Java 并发缺陷。

多线程程序的并发缺陷往往是 heisenbug,仅在特定调度下出现,难以稳定复现与修复。本文提出自动修复并发缺陷的方法:系统地从引发失败的内存访问模式中推断锁策略。方法先自动识别与缺陷显现相关的内存访问模式,进而推测程序意图的加锁策略,再按该策略修改程序,使这些引发失败的访问模式不可能发生。作者在支持 Java 的工具 PFix 中实现了该方法,并在 23 个并发缺陷上评估,成功自动修复 19 个;而最先进的 Java 并发缺陷修复工具 Grail 仅能正确修复 3 个,显示出显著优势。

问题
并发缺陷依赖特定调度,难以稳定复现和自动修复,现有自动修复工具(如 Grail)效果有限。
方法
自动识别与失败显现相关的内存访问模式,据此推断程序意图的锁策略,并通过实现该策略使引发失败的访问模式不可能发生。
评估
在支持 Java 的 PFix 工具中实现,对 23 个并发缺陷进行评测,自动修复 19 个,而 Grail 仅正确修复 3 个。
原文摘要(Abstract)

Concurrency bugs of a multi-threaded program may only manifest with certain scheduling, i.e., they are heisenbugs which are observed only from time to time if we execute the same program with the same input multiple times. They are notoriously hard to fix. In this work, we propose an approach to automatically fix concurrency bugs. Compared to previous approaches, our key idea is to systematically fix concurrency bugs by inferring locking policies from failure inducing memory-access patterns. That is, we automatically identify memory-access patterns which are correlated with the manifestation of the bug, and then conjecture what is the intended locking policy of the program. Afterwards, we fix the program by implementing the locking policy so that the failure inducing memory-access patterns are made impossible. We have implemented our approach in a toolkit called PFix which supports Java programs. We applied PFix to a set of 23 concurrency bugs and are able to automatically fix 19 of them. In comparison, Grail which is the state-of-the-art tool for fixing concurrency bugs in Java programs can only fix 3 of them correctly.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot4753,
  title = {PFix: fixing concurrency bugs based on memory access patterns},
  author = {Huarui Lin and Zan Wang and Shuang Liu and Jun Sun and Dongdi Zhang and Guangning Wei},
  booktitle = {ASE},
  year = {2018},
  doi = {10.1145/3238147.3238198}
}